2. AGENDA
• WHAT IS TAG MANAGEMENT?
• WHY TAG MANAGEMENT?
• WHAT IS THE WORKFLOW?
• HOW DOES THIS MAGIC WORK?
• WHAT ARE THE RISKS?
2
3. #WTF IS TAG
MANAGEMENT? [1]
A fast way to add and manage tracking codes
• no javascript snippets have to be add anymore
Leave the developers free to work on other
important tasks
3
4. WHY TAG MANAGEMENT
• only page views
• only websites
• one tracking solutions
• a handful tags
• not likely to change
• by & for webmasters
Tracking in the 90s:
limited and easy
• page views + events
• sites, apps + things
• lots of solutions
• tag pollution
• evolution & maintenance
• IT, CM, BI departments
….
Tracking nowadays:
powerful, yet complex
4
8. GTM JARGON
• tag = bits of tracking logic to inject
• rules = when is a tag allowed to proceed
• macros = interaction infos that the tag needs
• container = the bag of tags to inject on a website
• dataLayer = a common queue between capture
and tracking
8
9. CONTAINER
Big bag with lots of tags inside
• rule of thumb: 1 container per site
• 1 GTM user account can manage many containers
• publish changes once for all as versions
• preview and debug your changes before
publishing them
9
14. RULES
When should GTM inject the tracking code?
Examples:
- "on all pages"
- {{url}} matches RegEx .*
- {{event}} equals gtm.linkClick
BEWARE: a tag with no rule attached will not fire!
14
22. GTM TRACKING PROCESS
2. GTM tag interpreted
1. creates hidden iframe for browsers that doesn’t allow
scripts
2. loads gtm.js:
1. your specific container (tags, rules, macros )
2. generic GTM logic
22
23. GTM TRACKING PROCESS
3. GTM fires up:
1. if dataLayer does not exist, it creates it
2. all tags/rules/macros are instantiated and now listening
3. gtm events thrown
23
24. GTM TRACKING PROCESS
4. When a DOM event happens …
1. rules define which tracker tags gets fired and throws
events on dataLayer
24
25. GTM TRACKING PROCESS
5. when any event or data gets pushed on the dataLayer …
1. rules define which tracker performs
25
27. RISKS
Anyone with credentials and rights can inject harmful code
• probability: very probable (marketing dept ≠ security dept)
• impact: legal trouble, loss of trust, loss of users private infos, loss of business
infos
allow only one user to publish versions
"The marketing dudes will break everything!” [1]
• probability: it can happen
• impact: injected code disturbs normal page behaviour
get tech help when doing special stuff
27
28. REFERENCES
[1] Leo Berdu - Google Tag Manager for eCommerce
for further reading:
Simo Ahava - Google Tag Manager For Nerds
http://www.simoahava.com/
28