Custom Tag Manager Templates
Demo: Build Robust & Helpful Tags & Variables
Markus Baersch
Why Templates?
Sandbox API vs. JS / HTML
● Limited JS
● Sandboxed = Secure(?)
● Transparency
● Updates
● “CSP safe”
● Gallery!!!
● It is not that hard!
Rocket Science?! My “most successful” Custom Variable GTM Template
Community Tags
More typical vendors available
● Amplitude
● Awin
● Criteo
● Hubspot
● Klaviyo
● Mailchimp
● Matomo
● Outbrain
● Snapchat
● Snowplow
● Taboola
● TikTok
● Piwik PRO
● …
Demo
DataLayer Event Repeater
Race Conditions:
CM vs. GTM
Tag Template: repeat
certain events when fired
Tasks:
1. get dataLayer copy
2. Find events to repeat
3. Push to dataLayer again
Full Tag Template:
https://github.com/mbaersch/
datalayer-event-repeater/
Full Tag Template:
41 lines of unformatted code
Prototype:
Only a few lines!
Prototype: Permissions
Prototype: Debugging (sort of)
Prototype: Adding tag
No settings required
Prototype: test in console
Prototype: results console / Tag Assistant
Done ;)
Build!
“Missing Manual”
(focus on ssGTM)
markus-baersch.de/gtmbook
Thank you! :)
Questions?
or feedback?
markus-baersch.de/bsky

Custom Tag Manager Templates