4. GTMSPY.com ist ein nützliches Tool..
● Kostenlose Webapp
● Einblicke in fremde / nicht zugängliche GTM Container
● TAGS, VARIABLES, TRIGGERS auf einen Blick
5. Besonders lecker:
Code Viewer für Custom HTML Tags und Custom JS
Variables
..für verschiedene Use Cases
● Einfach mal auf andere Teller gucken
● Technisches Verständnis um den GTM erweitern
● Account Rettung
Unterstützung für Inline Variablen wie
{{Some Variable}}
7. var data = { ... }
Alles steht in der gtm.js, ..
https://googletagmanager.com/gtm.js?id=GTM-PTQKWD
Datenobjekt
{
"function":"__v",
"vtp_name":"gtm.elementClasses",
"vtp_dataLayerVersion":1
}
macros: [ … ]
{
"function":"__tl",
"vtp_eventName":"gtm.timer",
"vtp_interval":"30000",
"vtp_limit":"1",
"tag_id":115
}
tags: [ … ]
{
"function":"_css",
"arg0":["macro",6],
"arg1":"#centered_youtube_url"
}
predicates: [ … ]
..,
[["if",4,8,9,14],["unless",10,11,12,1
3],["add",4]],
..
rules: [ … ]
8. .., jedoch nicht gut lesbar 😅
Beispielhafter Custom HTML Tag
{
"function":"__html",
"once_per_event":true,
"vtp_html":"u003Cscript type="text/gtmscript"u003E(function(){var
a=navigator.userAgent.match(/(Version)/(d+).(d+)(?:.(d+)|).*Safari//g);(a=au0026u0026a[0].match
(/(d+).(d+)/g))u0026u002612.1u003C=parseFloat(a[0])u0026u0026window.addEventListener("beforeunload",
function(a){navigator.sendBeacon("https://cookie.trakken.de")})})();u003C/scriptu003E",
"vtp_supportDocumentWrite":false,
"vtp_enableIframeMode":false,
"vtp_enableEditJsMacroBehavior":false,
"tag_id":111
}