SlideShare ist ein Scribd-Unternehmen logo
1 von 77
Downloaden Sie, um offline zu lesen
Simo’s Top 30 GTM Tips
@SimoAhava from @8_bit_sheep
Simo’s Top 30 GTM Tips
@SimoAhava from @8_bit_sheep
Simo Ahava
Partner, co-founder, 8-bit-sheep
Google Developer Expert, Google Analytics
Blogger, developer, www.simoahava.com
Twitter-er, @SimoAhava
Google+:er, +SimoAhava
@SimoAhava from @8_bit_sheep
Google Tag Manager today
@SimoAhava from @8_bit_sheep
Google Tag Manager today
Who is it for?
For the “marketer”
For the “developer”
For the organization
Why it’s about marketing.
Why it’s about marketing.
1. Tags collect data for digital marketing purposes, first and
foremost.

2. TMS abstracts the underlying code — low barrier of entry
for people with little coding experience.

3. Semantic data collection is often deprioritized by
developers who are more invested in the presentational
and experiential layers. TMS is a tool which prioritizes this
semantic data layer.
Why it’s about development.
1. It’s a freaking code injector!

2. You can add all sorts of malicious / website-breaking /
malware-infested code with the click of a button.

3. If something goes awry, developers will be held
accountable as they own the processes.

4. A TMS can actually make development work easier, too.
Why it’s about organizations.
1. Data flows through the entire organization - it doesn’t
care about job titles.

2. Data quality can be compromised at every junction of the
data process - not just collection.
3. Any company/platform/tool/service collects absurd
amounts of data each passing second - only a mature
organization can tackle this overload.
@SimoAhava from @8_bit_sheep
#GTMTips
@SimoAhava from @8_bit_sheep
#GTMTips
Learnings over the years.
https://goo.gl/u99cjz
#1You can add the container JavaScript anywhere on the page or

even a linked JavaScript library.



The current recommendation is to add it to the <head> of the
document, but this is by no means mandatory.
#2You can add multiple container snippets on the page, but they must

all use the same dataLayer object name.
#3 Google Tag Manager only cares about the .push() method when

working with the dataLayer Array.
#4Typically dataLayer digests plain objects with key-value pairs.
#5 However, you can also push a command array if you want to
manipulate structures already in dataLayer.
#6 A Command Function will work as well.
#7 Only the 'event' key in a dataLayer.push() can trigger tags.
#8 Never overwrite the dataLayer, always push().
#9 All JavaScript types are supported as values
#10 dataLayer.push() copies the pushed key-value pairs into

GTM’s internal data model, where they (can) overwrite any pre-existing

values for the given keys.
#11 Preview Mode shows the state of tags, triggers, and variables

at the time of each dataLayer message.
#12 Preview Mode can be minimized.
#13To quit shared preview, you need to follow the original link.
#14 Google Tag Manager creates a new Universal Analytics tracker

with every single tag instance.
#15 Get the object representation of GTM’s dataLayer easily.
#16 Use Data Layer in Enhanced Ecommerce settings leverages the

Version 1 of the Data Layer Variable.
#17Version 1 of the Data Layer Variable only returns the most recent

value stored in the given Data Layer Variable name.



Version 2 provides dot notation support as well as recursive merge.

#18The Custom JavaScript Variable method for implementing

Enhanced Ecommerce tags is more flexible than "Use Data Layer".



The Custom JavaScript Variable lets you mutate the

Enhanced Ecommerce payload in Google Tag Manager.
#19 If click propagation is stopped, use the Click / All Elements trigger.
#20 Wait for Tags pauses the original event, but be careful!
#21Type this in the JavaScript console to sort Custom Dimension fields by
index number.
var el=document.querySelector('[diff-field$="customDimensionSection"]');var rows=el.querySelectorAll(".simple-table-row[data-ng-repeat]");var newRows=[];rows.forEach(function(row){var
inputIdx=row.querySelectorAll('input[type="text"]')[0];var inputVal=row.querySelectorAll('input[type="text"]')
[1];newRows.push({idx:inputIdx.value,val:inputVal.value})});newRows.sort(function(a,b){if(parseInt(a.idx)>parseInt(b.idx)){return 1}if(parseInt(a.idx)<parseInt(b.idx)){return-1}return
0});rows.forEach(function(row,i){var inputIdx=row.querySelectorAll('input[type="text"]')[0];var inputVal=row.querySelectorAll('input[type="text"]')
[1];inputIdx.value=newRows[i].idx;inputVal.value=newRows[i].val;inputIdx.dispatchEvent(new Event("change"));inputVal.dispatchEvent(new Event("change"))});
#22 Custom HTML Tag code is automatically minified.
#23 Custom HTML Tags are appended to the end of document.body.
#24 Custom JavaScript Variables are anonymous functions with a

return statement.
#25 Avoid side effects in Custom JavaScript Variables.
#26 In Tag Sequencing, the Setup and Cleanup tags fire with the 

main tag, regardless of their own triggers.
#27 Make sure you loosen up the Content Security Policy for GTM.
#28 Workspaces are not permanent. When you version a Workspace,

it is subsequently deleted.
#29 customTask is your best friend when it comes to implementing Google
Analytics tracking through GTM!
#30 Google Tag Manager ease / expertise correlates directly with your

JavaScript / HTML / CSS skills.
Thank you!
@SimoAhava | www.simoahava.com
#30: Google Tag Manager ease / expertise correlates directly with your

JavaScript / HTML / CSS skills.
Thank you!
@SimoAhava | www.simoahava.com

Weitere ähnliche Inhalte

Ähnlich wie Simo's Top 30 GTM tips

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
 
Final report mobile shop
Final report   mobile shopFinal report   mobile shop
Final report mobile shopViditsingh22
 
Grails Custom Tag lib
Grails Custom Tag libGrails Custom Tag lib
Grails Custom Tag libAli Tanwir
 
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisIBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisTorsten Steinbach
 
Google Tag Manager For Nerds
Google Tag Manager For NerdsGoogle Tag Manager For Nerds
Google Tag Manager For NerdsSimo Ahava
 
Introduction about Google Tag manager
Introduction about Google Tag manager Introduction about Google Tag manager
Introduction about Google Tag manager Jam Hassan
 
PASS Spanish Recomendaciones para entornos de SQL Server productivos
PASS Spanish   Recomendaciones para entornos de SQL Server productivosPASS Spanish   Recomendaciones para entornos de SQL Server productivos
PASS Spanish Recomendaciones para entornos de SQL Server productivosJavier Villegas
 
MS SQL SERVER: Microsoft time series algorithm
MS SQL SERVER: Microsoft time series algorithmMS SQL SERVER: Microsoft time series algorithm
MS SQL SERVER: Microsoft time series algorithmsqlserver content
 
MS SQL SERVER: Time series algorithm
MS SQL SERVER: Time series algorithmMS SQL SERVER: Time series algorithm
MS SQL SERVER: Time series algorithmDataminingTools Inc
 
How to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on SnowflakeHow to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on SnowflakeAtScale
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083Divyam Pateriya
 
Asp.net mvc training
Asp.net mvc trainingAsp.net mvc training
Asp.net mvc trainingicubesystem
 
Aug Xml Net Forum Dynamics Integration
Aug Xml Net Forum Dynamics IntegrationAug Xml Net Forum Dynamics Integration
Aug Xml Net Forum Dynamics IntegrationMariAnne Woehrle
 
Google Tag Manager (GTM)
Google Tag Manager (GTM)Google Tag Manager (GTM)
Google Tag Manager (GTM)Dragos Ionita
 
How not to suck at Cyber Security
How not to suck at Cyber SecurityHow not to suck at Cyber Security
How not to suck at Cyber SecurityChris Watts
 
James Jara Portfolio 2014 - Enterprise datagrid - Part 3
James Jara Portfolio 2014  - Enterprise datagrid - Part 3James Jara Portfolio 2014  - Enterprise datagrid - Part 3
James Jara Portfolio 2014 - Enterprise datagrid - Part 3James Jara
 
Intro to Rails ActiveRecord
Intro to Rails ActiveRecordIntro to Rails ActiveRecord
Intro to Rails ActiveRecordMark Menard
 
Benefits of Google Tag Manager
Benefits of Google Tag ManagerBenefits of Google Tag Manager
Benefits of Google Tag ManagerPhil Pearce
 

Ähnlich wie Simo's Top 30 GTM tips (20)

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
 
Final report mobile shop
Final report   mobile shopFinal report   mobile shop
Final report mobile shop
 
Grails Custom Tag lib
Grails Custom Tag libGrails Custom Tag lib
Grails Custom Tag lib
 
Grails custom tag lib
Grails custom tag libGrails custom tag lib
Grails custom tag lib
 
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisIBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
 
Google Tag Manager For Nerds
Google Tag Manager For NerdsGoogle Tag Manager For Nerds
Google Tag Manager For Nerds
 
Introduction about Google Tag manager
Introduction about Google Tag manager Introduction about Google Tag manager
Introduction about Google Tag manager
 
PASS Spanish Recomendaciones para entornos de SQL Server productivos
PASS Spanish   Recomendaciones para entornos de SQL Server productivosPASS Spanish   Recomendaciones para entornos de SQL Server productivos
PASS Spanish Recomendaciones para entornos de SQL Server productivos
 
MS SQL SERVER: Microsoft time series algorithm
MS SQL SERVER: Microsoft time series algorithmMS SQL SERVER: Microsoft time series algorithm
MS SQL SERVER: Microsoft time series algorithm
 
MS SQL SERVER: Time series algorithm
MS SQL SERVER: Time series algorithmMS SQL SERVER: Time series algorithm
MS SQL SERVER: Time series algorithm
 
How to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on SnowflakeHow to Realize an Additional 270% ROI on Snowflake
How to Realize an Additional 270% ROI on Snowflake
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Asp.net mvc training
Asp.net mvc trainingAsp.net mvc training
Asp.net mvc training
 
Aug Xml Net Forum Dynamics Integration
Aug Xml Net Forum Dynamics IntegrationAug Xml Net Forum Dynamics Integration
Aug Xml Net Forum Dynamics Integration
 
Google Tag Manager (GTM)
Google Tag Manager (GTM)Google Tag Manager (GTM)
Google Tag Manager (GTM)
 
How not to suck at Cyber Security
How not to suck at Cyber SecurityHow not to suck at Cyber Security
How not to suck at Cyber Security
 
James Jara Portfolio 2014 - Enterprise datagrid - Part 3
James Jara Portfolio 2014  - Enterprise datagrid - Part 3James Jara Portfolio 2014  - Enterprise datagrid - Part 3
James Jara Portfolio 2014 - Enterprise datagrid - Part 3
 
SVCC Intro to Grails
SVCC Intro to GrailsSVCC Intro to Grails
SVCC Intro to Grails
 
Intro to Rails ActiveRecord
Intro to Rails ActiveRecordIntro to Rails ActiveRecord
Intro to Rails ActiveRecord
 
Benefits of Google Tag Manager
Benefits of Google Tag ManagerBenefits of Google Tag Manager
Benefits of Google Tag Manager
 

Mehr von Simo Ahava

Web Browsers and Tracking Protections
Web Browsers and Tracking ProtectionsWeb Browsers and Tracking Protections
Web Browsers and Tracking ProtectionsSimo Ahava
 
Server-side Tagging in Google Tag Manager - MeasureSummit 2020
Server-side Tagging in Google Tag Manager - MeasureSummit 2020Server-side Tagging in Google Tag Manager - MeasureSummit 2020
Server-side Tagging in Google Tag Manager - MeasureSummit 2020Simo Ahava
 
Browser Tracking Protections - SuperWeek 2020
Browser Tracking Protections - SuperWeek 2020Browser Tracking Protections - SuperWeek 2020
Browser Tracking Protections - SuperWeek 2020Simo Ahava
 
You can't spell MEASURE without CUSTOMIZATION
You can't spell MEASURE without CUSTOMIZATIONYou can't spell MEASURE without CUSTOMIZATION
You can't spell MEASURE without CUSTOMIZATIONSimo Ahava
 
Essential Search Marketing Tweaks For Google Analytics And Google Tag Manager
Essential Search Marketing Tweaks For Google Analytics And Google Tag ManagerEssential Search Marketing Tweaks For Google Analytics And Google Tag Manager
Essential Search Marketing Tweaks For Google Analytics And Google Tag ManagerSimo Ahava
 
Agile Analytics
Agile AnalyticsAgile Analytics
Agile AnalyticsSimo Ahava
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsSimo Ahava
 
Search Marketer's Toolkit for Google Tag Manager and Google Analytics
Search Marketer's Toolkit for Google Tag Manager and Google AnalyticsSearch Marketer's Toolkit for Google Tag Manager and Google Analytics
Search Marketer's Toolkit for Google Tag Manager and Google AnalyticsSimo Ahava
 
Content Analytics - The Whys And Hows For Google Analytics
Content Analytics - The Whys And Hows For Google AnalyticsContent Analytics - The Whys And Hows For Google Analytics
Content Analytics - The Whys And Hows For Google AnalyticsSimo Ahava
 
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS WorldSuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS WorldSimo Ahava
 
Meaningful Data - Reaktor Breakpoint 2015
Meaningful Data - Reaktor Breakpoint 2015Meaningful Data - Reaktor Breakpoint 2015
Meaningful Data - Reaktor Breakpoint 2015Simo Ahava
 
Meaningful Data - Best Internet Conference 2015 (Lithuania)
Meaningful Data - Best Internet Conference 2015 (Lithuania)Meaningful Data - Best Internet Conference 2015 (Lithuania)
Meaningful Data - Best Internet Conference 2015 (Lithuania)Simo Ahava
 
Tricks and tweaks for Google Analytics and Google Tag Manager
Tricks and tweaks for Google Analytics and Google Tag ManagerTricks and tweaks for Google Analytics and Google Tag Manager
Tricks and tweaks for Google Analytics and Google Tag ManagerSimo Ahava
 
Key Insights From Funnels - Enhanced Ecommerce For Google Analytics
Key Insights From Funnels - Enhanced Ecommerce For Google AnalyticsKey Insights From Funnels - Enhanced Ecommerce For Google Analytics
Key Insights From Funnels - Enhanced Ecommerce For Google AnalyticsSimo Ahava
 
Content Engagement with Google Analytics (Emerce Conversion 2015)
Content Engagement with Google Analytics (Emerce Conversion 2015)Content Engagement with Google Analytics (Emerce Conversion 2015)
Content Engagement with Google Analytics (Emerce Conversion 2015)Simo Ahava
 
Enhanced Ecommerce For Content (SMX München 2015)
Enhanced Ecommerce For Content (SMX München 2015)Enhanced Ecommerce For Content (SMX München 2015)
Enhanced Ecommerce For Content (SMX München 2015)Simo Ahava
 
Be Critical: Going Beyond The Defaults With GA And GTM (SMX Munich 2015)
Be Critical: Going Beyond The Defaults With GA And GTM (SMX Munich 2015)Be Critical: Going Beyond The Defaults With GA And GTM (SMX Munich 2015)
Be Critical: Going Beyond The Defaults With GA And GTM (SMX Munich 2015)Simo Ahava
 
Rationalizing Tag Management
Rationalizing Tag ManagementRationalizing Tag Management
Rationalizing Tag ManagementSimo Ahava
 
Google Analytics Bag O' Tricks
Google Analytics Bag O' TricksGoogle Analytics Bag O' Tricks
Google Analytics Bag O' TricksSimo Ahava
 
Tag Management Solutions - Best Data Ever (Marketing Festival 2014)
Tag Management Solutions - Best Data Ever (Marketing Festival 2014)Tag Management Solutions - Best Data Ever (Marketing Festival 2014)
Tag Management Solutions - Best Data Ever (Marketing Festival 2014)Simo Ahava
 

Mehr von Simo Ahava (20)

Web Browsers and Tracking Protections
Web Browsers and Tracking ProtectionsWeb Browsers and Tracking Protections
Web Browsers and Tracking Protections
 
Server-side Tagging in Google Tag Manager - MeasureSummit 2020
Server-side Tagging in Google Tag Manager - MeasureSummit 2020Server-side Tagging in Google Tag Manager - MeasureSummit 2020
Server-side Tagging in Google Tag Manager - MeasureSummit 2020
 
Browser Tracking Protections - SuperWeek 2020
Browser Tracking Protections - SuperWeek 2020Browser Tracking Protections - SuperWeek 2020
Browser Tracking Protections - SuperWeek 2020
 
You can't spell MEASURE without CUSTOMIZATION
You can't spell MEASURE without CUSTOMIZATIONYou can't spell MEASURE without CUSTOMIZATION
You can't spell MEASURE without CUSTOMIZATION
 
Essential Search Marketing Tweaks For Google Analytics And Google Tag Manager
Essential Search Marketing Tweaks For Google Analytics And Google Tag ManagerEssential Search Marketing Tweaks For Google Analytics And Google Tag Manager
Essential Search Marketing Tweaks For Google Analytics And Google Tag Manager
 
Agile Analytics
Agile AnalyticsAgile Analytics
Agile Analytics
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
 
Search Marketer's Toolkit for Google Tag Manager and Google Analytics
Search Marketer's Toolkit for Google Tag Manager and Google AnalyticsSearch Marketer's Toolkit for Google Tag Manager and Google Analytics
Search Marketer's Toolkit for Google Tag Manager and Google Analytics
 
Content Analytics - The Whys And Hows For Google Analytics
Content Analytics - The Whys And Hows For Google AnalyticsContent Analytics - The Whys And Hows For Google Analytics
Content Analytics - The Whys And Hows For Google Analytics
 
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS WorldSuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
 
Meaningful Data - Reaktor Breakpoint 2015
Meaningful Data - Reaktor Breakpoint 2015Meaningful Data - Reaktor Breakpoint 2015
Meaningful Data - Reaktor Breakpoint 2015
 
Meaningful Data - Best Internet Conference 2015 (Lithuania)
Meaningful Data - Best Internet Conference 2015 (Lithuania)Meaningful Data - Best Internet Conference 2015 (Lithuania)
Meaningful Data - Best Internet Conference 2015 (Lithuania)
 
Tricks and tweaks for Google Analytics and Google Tag Manager
Tricks and tweaks for Google Analytics and Google Tag ManagerTricks and tweaks for Google Analytics and Google Tag Manager
Tricks and tweaks for Google Analytics and Google Tag Manager
 
Key Insights From Funnels - Enhanced Ecommerce For Google Analytics
Key Insights From Funnels - Enhanced Ecommerce For Google AnalyticsKey Insights From Funnels - Enhanced Ecommerce For Google Analytics
Key Insights From Funnels - Enhanced Ecommerce For Google Analytics
 
Content Engagement with Google Analytics (Emerce Conversion 2015)
Content Engagement with Google Analytics (Emerce Conversion 2015)Content Engagement with Google Analytics (Emerce Conversion 2015)
Content Engagement with Google Analytics (Emerce Conversion 2015)
 
Enhanced Ecommerce For Content (SMX München 2015)
Enhanced Ecommerce For Content (SMX München 2015)Enhanced Ecommerce For Content (SMX München 2015)
Enhanced Ecommerce For Content (SMX München 2015)
 
Be Critical: Going Beyond The Defaults With GA And GTM (SMX Munich 2015)
Be Critical: Going Beyond The Defaults With GA And GTM (SMX Munich 2015)Be Critical: Going Beyond The Defaults With GA And GTM (SMX Munich 2015)
Be Critical: Going Beyond The Defaults With GA And GTM (SMX Munich 2015)
 
Rationalizing Tag Management
Rationalizing Tag ManagementRationalizing Tag Management
Rationalizing Tag Management
 
Google Analytics Bag O' Tricks
Google Analytics Bag O' TricksGoogle Analytics Bag O' Tricks
Google Analytics Bag O' Tricks
 
Tag Management Solutions - Best Data Ever (Marketing Festival 2014)
Tag Management Solutions - Best Data Ever (Marketing Festival 2014)Tag Management Solutions - Best Data Ever (Marketing Festival 2014)
Tag Management Solutions - Best Data Ever (Marketing Festival 2014)
 

Kürzlich hochgeladen

Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 

Kürzlich hochgeladen (20)

Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 

Simo's Top 30 GTM tips

  • 1. Simo’s Top 30 GTM Tips @SimoAhava from @8_bit_sheep
  • 2. Simo’s Top 30 GTM Tips @SimoAhava from @8_bit_sheep
  • 3. Simo Ahava Partner, co-founder, 8-bit-sheep Google Developer Expert, Google Analytics Blogger, developer, www.simoahava.com Twitter-er, @SimoAhava Google+:er, +SimoAhava
  • 5. @SimoAhava from @8_bit_sheep Google Tag Manager today Who is it for?
  • 9. Why it’s about marketing.
  • 10. Why it’s about marketing. 1. Tags collect data for digital marketing purposes, first and foremost.
 2. TMS abstracts the underlying code — low barrier of entry for people with little coding experience.
 3. Semantic data collection is often deprioritized by developers who are more invested in the presentational and experiential layers. TMS is a tool which prioritizes this semantic data layer.
  • 11. Why it’s about development. 1. It’s a freaking code injector!
 2. You can add all sorts of malicious / website-breaking / malware-infested code with the click of a button.
 3. If something goes awry, developers will be held accountable as they own the processes.
 4. A TMS can actually make development work easier, too.
  • 12. Why it’s about organizations. 1. Data flows through the entire organization - it doesn’t care about job titles.
 2. Data quality can be compromised at every junction of the data process - not just collection. 3. Any company/platform/tool/service collects absurd amounts of data each passing second - only a mature organization can tackle this overload.
  • 16.
  • 17. #1You can add the container JavaScript anywhere on the page or
 even a linked JavaScript library.
 
 The current recommendation is to add it to the <head> of the document, but this is by no means mandatory.
  • 18.
  • 19. #2You can add multiple container snippets on the page, but they must
 all use the same dataLayer object name.
  • 20.
  • 21. #3 Google Tag Manager only cares about the .push() method when
 working with the dataLayer Array.
  • 22.
  • 23. #4Typically dataLayer digests plain objects with key-value pairs.
  • 24.
  • 25. #5 However, you can also push a command array if you want to manipulate structures already in dataLayer.
  • 26.
  • 27. #6 A Command Function will work as well.
  • 28.
  • 29. #7 Only the 'event' key in a dataLayer.push() can trigger tags.
  • 30.
  • 31. #8 Never overwrite the dataLayer, always push().
  • 32.
  • 33. #9 All JavaScript types are supported as values
  • 34.
  • 35. #10 dataLayer.push() copies the pushed key-value pairs into
 GTM’s internal data model, where they (can) overwrite any pre-existing
 values for the given keys.
  • 36.
  • 37. #11 Preview Mode shows the state of tags, triggers, and variables
 at the time of each dataLayer message.
  • 38.
  • 39. #12 Preview Mode can be minimized.
  • 40.
  • 41. #13To quit shared preview, you need to follow the original link.
  • 42.
  • 43. #14 Google Tag Manager creates a new Universal Analytics tracker
 with every single tag instance.
  • 44.
  • 45. #15 Get the object representation of GTM’s dataLayer easily.
  • 46.
  • 47. #16 Use Data Layer in Enhanced Ecommerce settings leverages the
 Version 1 of the Data Layer Variable.
  • 48.
  • 49. #17Version 1 of the Data Layer Variable only returns the most recent
 value stored in the given Data Layer Variable name.
 
 Version 2 provides dot notation support as well as recursive merge.

  • 50.
  • 51. #18The Custom JavaScript Variable method for implementing
 Enhanced Ecommerce tags is more flexible than "Use Data Layer".
 
 The Custom JavaScript Variable lets you mutate the
 Enhanced Ecommerce payload in Google Tag Manager.
  • 52.
  • 53. #19 If click propagation is stopped, use the Click / All Elements trigger.
  • 54.
  • 55. #20 Wait for Tags pauses the original event, but be careful!
  • 56.
  • 57. #21Type this in the JavaScript console to sort Custom Dimension fields by index number. var el=document.querySelector('[diff-field$="customDimensionSection"]');var rows=el.querySelectorAll(".simple-table-row[data-ng-repeat]");var newRows=[];rows.forEach(function(row){var inputIdx=row.querySelectorAll('input[type="text"]')[0];var inputVal=row.querySelectorAll('input[type="text"]') [1];newRows.push({idx:inputIdx.value,val:inputVal.value})});newRows.sort(function(a,b){if(parseInt(a.idx)>parseInt(b.idx)){return 1}if(parseInt(a.idx)<parseInt(b.idx)){return-1}return 0});rows.forEach(function(row,i){var inputIdx=row.querySelectorAll('input[type="text"]')[0];var inputVal=row.querySelectorAll('input[type="text"]') [1];inputIdx.value=newRows[i].idx;inputVal.value=newRows[i].val;inputIdx.dispatchEvent(new Event("change"));inputVal.dispatchEvent(new Event("change"))});
  • 58.
  • 59. #22 Custom HTML Tag code is automatically minified.
  • 60.
  • 61. #23 Custom HTML Tags are appended to the end of document.body.
  • 62.
  • 63. #24 Custom JavaScript Variables are anonymous functions with a
 return statement.
  • 64.
  • 65. #25 Avoid side effects in Custom JavaScript Variables.
  • 66.
  • 67. #26 In Tag Sequencing, the Setup and Cleanup tags fire with the 
 main tag, regardless of their own triggers.
  • 68.
  • 69. #27 Make sure you loosen up the Content Security Policy for GTM.
  • 70.
  • 71. #28 Workspaces are not permanent. When you version a Workspace,
 it is subsequently deleted.
  • 72.
  • 73. #29 customTask is your best friend when it comes to implementing Google Analytics tracking through GTM!
  • 74.
  • 75. #30 Google Tag Manager ease / expertise correlates directly with your
 JavaScript / HTML / CSS skills.
  • 76. Thank you! @SimoAhava | www.simoahava.com
  • 77. #30: Google Tag Manager ease / expertise correlates directly with your
 JavaScript / HTML / CSS skills. Thank you! @SimoAhava | www.simoahava.com