SlideShare a Scribd company logo
1 of 29
Download to read offline
GOOGLE TAG
MANAGER
MAGIC
Steven Stadler
Twitter: @joermungandr
Email: steven.stadler@gmail.com
@jobmensa.de
AGENDA
• WHAT IS TAG MANAGEMENT?
• WHY TAG MANAGEMENT?
• WHAT IS THE WORKFLOW?
• HOW DOES THIS MAGIC WORK?
• WHAT ARE THE RISKS?
2
#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
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
SOME BENEFITS
• Smart Caching
• Tag Blacklist
• Debug Console
• Version History
5
6
[1]
WORKFLOW
Partner
delivers
tag(s)
Briefing
Create Tag in GTM
Create Variables
Create Triggers
Create Rules
Test in debug
mode
PUBLISH
7
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
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
10
TAGS
Bits of tracking logic to inject/instantiate on the
page.
• you can add:
• ready-made tags (GA, AdWords, …)
• custom tags
11
12
13
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
15
16
17
MACROS
Accessors to element/event/page information. (now variables)
Provided out-of-the-box by GTM:
- {{url}}
- {{url hostname}}
- {{url path}}
- {{referrer}}
- …
18
19
20
GTM TRACKING PROCESS
1. Browser loads page with GTM <script> tag
21
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
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
GTM TRACKING PROCESS
4. When a DOM event happens …
1. rules define which tracker tags gets fired and throws
events on dataLayer
24
GTM TRACKING PROCESS
5. when any event or data gets pushed on the dataLayer …
1. rules define which tracker performs
25
26
[1]
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
REFERENCES
[1] Leo Berdu - Google Tag Manager for eCommerce
for further reading:
Simo Ahava - Google Tag Manager For Nerds
http://www.simoahava.com/
28
QUESTIONS?
29

More Related Content

Similar to Introduction to Google Tag Manager

Introduction about Google Tag manager
Introduction about Google Tag manager Introduction about Google Tag manager
Introduction about Google Tag manager Jam Hassan
 
Google Tag Manager | Google Tag Manager Tutorial 2019 | Google Tag Manager Se...
Google Tag Manager | Google Tag Manager Tutorial 2019 | Google Tag Manager Se...Google Tag Manager | Google Tag Manager Tutorial 2019 | Google Tag Manager Se...
Google Tag Manager | Google Tag Manager Tutorial 2019 | Google Tag Manager Se...Simplilearn
 
Expert Tips and Techniques for Using Google Tag Manager
Expert Tips and Techniques  for Using Google Tag ManagerExpert Tips and Techniques  for Using Google Tag Manager
Expert Tips and Techniques for Using Google Tag ManagerOWOX BI
 
Google Tag Manager - Revolve Conference 2015
Google Tag Manager - Revolve Conference 2015Google Tag Manager - Revolve Conference 2015
Google Tag Manager - Revolve Conference 2015Tina Arnoldi, MA, LPC
 
Google Tag Manager for actionable metrics - Beyond basic Google Analytics
Google Tag Manager for actionable metrics - Beyond basic Google AnalyticsGoogle Tag Manager for actionable metrics - Beyond basic Google Analytics
Google Tag Manager for actionable metrics - Beyond basic Google AnalyticsDesignHammer
 
Google Analytics and Google Tag Manager for Startups
Google Analytics and Google Tag Manager for StartupsGoogle Analytics and Google Tag Manager for Startups
Google Analytics and Google Tag Manager for StartupsJoost Hoogstrate
 
What is google tag manager and how to get started
What is google tag manager and how to get startedWhat is google tag manager and how to get started
What is google tag manager and how to get startedNithish P
 
Google Tag Manager for actionable metrics - Beyond basic Google Analytics
Google Tag Manager for actionable metrics - Beyond basic Google AnalyticsGoogle Tag Manager for actionable metrics - Beyond basic Google Analytics
Google Tag Manager for actionable metrics - Beyond basic Google AnalyticsDesignHammer
 
Google Tag Manager
Google Tag ManagerGoogle Tag Manager
Google Tag ManagerKim Towne
 
Garelic: Google Analytics as App Performance monitoring
Garelic: Google Analytics as App Performance monitoringGarelic: Google Analytics as App Performance monitoring
Garelic: Google Analytics as App Performance monitoringJano Suchal
 
A Detailed Guide on New Google Global Site Tag.pdf
A Detailed Guide on New Google Global Site Tag.pdfA Detailed Guide on New Google Global Site Tag.pdf
A Detailed Guide on New Google Global Site Tag.pdfecommerce Trends
 
4 clicks 2 Measurement - Analytics Automation @ SuperWeek
4 clicks 2 Measurement - Analytics Automation @ SuperWeek4 clicks 2 Measurement - Analytics Automation @ SuperWeek
4 clicks 2 Measurement - Analytics Automation @ SuperWeekPhil Pearce
 
"Taster Slides" for Most advanced GTM implementation
"Taster Slides" for Most advanced GTM implementation"Taster Slides" for Most advanced GTM implementation
"Taster Slides" for Most advanced GTM implementationPhil Pearce
 
Secrets to Optimize Website Tracking for User Engagement
Secrets to Optimize Website Tracking for User EngagementSecrets to Optimize Website Tracking for User Engagement
Secrets to Optimize Website Tracking for User EngagementAlightAnalytics
 
Google Tag Manager - How to migrate to V2 interface
Google Tag Manager - How to migrate to V2 interfaceGoogle Tag Manager - How to migrate to V2 interface
Google Tag Manager - How to migrate to V2 interfacePhil Pearce
 
GA4/GTAG Data Capture Alternatives
GA4/GTAG Data Capture AlternativesGA4/GTAG Data Capture Alternatives
GA4/GTAG Data Capture Alternatives📊 Markus Baersch
 

Similar to Introduction to Google Tag Manager (20)

Introduction about Google Tag manager
Introduction about Google Tag manager Introduction about Google Tag manager
Introduction about Google Tag manager
 
Google Tag Manager | Google Tag Manager Tutorial 2019 | Google Tag Manager Se...
Google Tag Manager | Google Tag Manager Tutorial 2019 | Google Tag Manager Se...Google Tag Manager | Google Tag Manager Tutorial 2019 | Google Tag Manager Se...
Google Tag Manager | Google Tag Manager Tutorial 2019 | Google Tag Manager Se...
 
Expert Tips and Techniques for Using Google Tag Manager
Expert Tips and Techniques  for Using Google Tag ManagerExpert Tips and Techniques  for Using Google Tag Manager
Expert Tips and Techniques for Using Google Tag Manager
 
Google Tag Manager - Revolve Conference 2015
Google Tag Manager - Revolve Conference 2015Google Tag Manager - Revolve Conference 2015
Google Tag Manager - Revolve Conference 2015
 
Google Tag Manager for actionable metrics - Beyond basic Google Analytics
Google Tag Manager for actionable metrics - Beyond basic Google AnalyticsGoogle Tag Manager for actionable metrics - Beyond basic Google Analytics
Google Tag Manager for actionable metrics - Beyond basic Google Analytics
 
Google Analytics and Google Tag Manager for Startups
Google Analytics and Google Tag Manager for StartupsGoogle Analytics and Google Tag Manager for Startups
Google Analytics and Google Tag Manager for Startups
 
What is google tag manager and how to get started
What is google tag manager and how to get startedWhat is google tag manager and how to get started
What is google tag manager and how to get started
 
Google Tag Manager for actionable metrics - Beyond basic Google Analytics
Google Tag Manager for actionable metrics - Beyond basic Google AnalyticsGoogle Tag Manager for actionable metrics - Beyond basic Google Analytics
Google Tag Manager for actionable metrics - Beyond basic Google Analytics
 
Stima mkt cloud-tms_20150319
Stima mkt cloud-tms_20150319Stima mkt cloud-tms_20150319
Stima mkt cloud-tms_20150319
 
Tag Management Systems
Tag Management SystemsTag Management Systems
Tag Management Systems
 
Google Tag Manager
Google Tag ManagerGoogle Tag Manager
Google Tag Manager
 
Garelic: Google Analytics as App Performance monitoring
Garelic: Google Analytics as App Performance monitoringGarelic: Google Analytics as App Performance monitoring
Garelic: Google Analytics as App Performance monitoring
 
Google Analytics Meetup: Auto Event Tracking
Google Analytics Meetup: Auto Event TrackingGoogle Analytics Meetup: Auto Event Tracking
Google Analytics Meetup: Auto Event Tracking
 
A Detailed Guide on New Google Global Site Tag.pdf
A Detailed Guide on New Google Global Site Tag.pdfA Detailed Guide on New Google Global Site Tag.pdf
A Detailed Guide on New Google Global Site Tag.pdf
 
4 clicks 2 Measurement - Analytics Automation @ SuperWeek
4 clicks 2 Measurement - Analytics Automation @ SuperWeek4 clicks 2 Measurement - Analytics Automation @ SuperWeek
4 clicks 2 Measurement - Analytics Automation @ SuperWeek
 
"Taster Slides" for Most advanced GTM implementation
"Taster Slides" for Most advanced GTM implementation"Taster Slides" for Most advanced GTM implementation
"Taster Slides" for Most advanced GTM implementation
 
Secrets to Optimize Website Tracking for User Engagement
Secrets to Optimize Website Tracking for User EngagementSecrets to Optimize Website Tracking for User Engagement
Secrets to Optimize Website Tracking for User Engagement
 
Google Tag Manager - How to migrate to V2 interface
Google Tag Manager - How to migrate to V2 interfaceGoogle Tag Manager - How to migrate to V2 interface
Google Tag Manager - How to migrate to V2 interface
 
GA4/GTAG Data Capture Alternatives
GA4/GTAG Data Capture AlternativesGA4/GTAG Data Capture Alternatives
GA4/GTAG Data Capture Alternatives
 
Google Tag Manager 101
Google Tag Manager 101Google Tag Manager 101
Google Tag Manager 101
 

Recently uploaded

Digi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxDigi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxTanveerAhmed817946
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 

Recently uploaded (20)

Digi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptxDigi Khata Problem along complete plan.pptx
Digi Khata Problem along complete plan.pptx
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 

Introduction to Google Tag Manager

  • 1. GOOGLE TAG MANAGER MAGIC Steven Stadler Twitter: @joermungandr Email: steven.stadler@gmail.com @jobmensa.de
  • 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
  • 5. SOME BENEFITS • Smart Caching • Tag Blacklist • Debug Console • Version History 5
  • 7. WORKFLOW Partner delivers tag(s) Briefing Create Tag in GTM Create Variables Create Triggers Create Rules Test in debug mode PUBLISH 7
  • 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
  • 10. 10
  • 11. TAGS Bits of tracking logic to inject/instantiate on the page. • you can add: • ready-made tags (GA, AdWords, …) • custom tags 11
  • 12. 12
  • 13. 13
  • 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
  • 15. 15
  • 16. 16
  • 17. 17
  • 18. MACROS Accessors to element/event/page information. (now variables) Provided out-of-the-box by GTM: - {{url}} - {{url hostname}} - {{url path}} - {{referrer}} - … 18
  • 19. 19
  • 20. 20
  • 21. GTM TRACKING PROCESS 1. Browser loads page with GTM <script> tag 21
  • 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