"Taster Slides" for Most advanced GTM implementation
1. #emetrics @PHILPEARCE
New York
26th Oct 2016
Learnings from the most Advanced GTM
Deployment I have ever done!
(On a site with 1 billion hits a month)
By Phil Pearce
3. Agenda
1. Set the scene
– Size
– Complexity
– Timelines
2. How we got there
– Tools
– Strategy
3. Conclusion & take always
– Checklist
– Solution Library
4. Questions
5. “How many Google Tag
Manager installations have
YOU done?”
1. Newbie: 1-3 installation
2. Experienced: 4-10
installation
3. Advanced: 10+ installation
Survey results
https://plus.google.com/117298997433687198127/posts/dW5TjdS7XEV
https://twitter.com/philpearce/status/779678727861104640
Super Experienced
people
8. So, a beautiful but
HUGE new client just signed!
• 400 man-hours GTM project
• 600 GA classic events
• GA classic to Universal pageview migration
• Inhouse TMS.js migration to GTM
• 6 CMS platforms
• Only 3 months to complete!
• Fine per task, if not completed within the timeline!
11. Switch from GA classic
to GA universal
Migrate existing 200
GA events in GTM
Add 400 GA events
(auto-events)
Move pageview from
TMS.js (inhouse TMS)
into GTM
Preliminary GTM
account audit
Behemoth
Project Timeline
to climb the mountain
13. In Reality…
Inhouse IT dept slow to respond, thus
impossible to enforce the task based fines.
14. How did we get to the Summit?
And more importantly...
• What went right?
• What went wrong?
15. The Win was deliver by
Technical & Tactical working together!
BusinessTechnical
16. Plus lots of Tools & Techniques!
Technical (Phil)
• Testing Tools
• Strawman Test environment
• Separate DEV & LIVE environments
• Auto-QA
• Failsafe deadman switch
• Security
• Governance of Logins & access levels
• Controlling Risk factors
Tactical (Agency)
• Task prioritisation
• Split based on “required client
dependencies”
• Sorted based on cost vs benefit
• Weighted based on strategically
important items
Wins MistakesWins Mistakes
23. 2. Client-side switch example
<!– Client Side Switch: Google Tag Manager: Output myGTMID -->
<script>
var myHostname = window.location.hostname;
var myGTMID = 'GTM-xxx1'; // LIVE
if(myHostname === 'staging.behemothclient.com' || myHostname === 'localhost'){
myGTMID = 'GTM-xxx2'; // DEV
}
</script>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-xxx1"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer', myGTMID);</script>
<!-- End Google Tag Manager -->
Working example… saintsandstrangers.behemothclient.com
Code hidden in taster slides
24. PII prevention filters
PP01a: TidyURL - Replace email with EMAIL-OBFUSCATED-BY-FILTER@gmail.com (start of string)
URL (.*?)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)($|&.+)
Output URL $A1=EMAIL-OBFUSCATED-BY-FILTER@gmail.com$A5
PP01b: TidyURL - Replace email with EMAIL-OBFUSCATED-BY-FILTER@gmail.com (end of string)
URL (.*)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)($|&.+)
Output URL $A1=EMAIL-OBFUSCATED-BY-FILTER@gmail.com$A5
PP02a: Tidy EventLabel - Replace email with EMAIL-OBFUSCATED-BY-FILTER@gmail.com (start of string)
EventLabel (.*?)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)($|&.+)
Output EventLabel $A1=EMAIL-OBFUSCATED-BY-FILTER@gmail.com$A5
PP02b: Tidy EventLabel - Replace email with EMAIL-OBFUSCATED-BY-FILTER@gmail.com (end of string)
EventLabel (.*)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)($|&.+)
Output EventLabel $A1=EMAIL-OBFUSCATED-BY-FILTER@gmail.com$A5
RegEx filter hidden
in taster slides
32. Multiple users: Check-in/Check-out
Solution1: Check-in/Check-out processes
and enforce View | Edit access.
Email Role Account
Permissions
01.
LIVE
02
DEV
phil@agency.com Administrator manage users edit publish
dave@agency.com Tester view
brian@client.com Administrator manage users view view
mary@client.com Administrator manage users view view
mathew@client.com Tester view view
devtools@client.com Tester view
When Check-out set to read-only
33. Solution2: Create User sandboxes
User1 | User2 >> DEV >> LIVE
Multiple users: sandboxes
Email Role Job title Account
Permissions
01.
LIVE
02
DEV
Marys
Sandbox
Mathews
Sandbox
phil@agency.com Administrator Implementation Specialist manage users edit publish view view
dave@agency.com Tester Project Manager view
brian@client.com Administrator Systems Admin manage users view view view view
mary@client.com Administrator Analyst manage users view view publish view
mathew@client.com Publisher Marketing Manager view view publish
devtools@client.com Tester Robot Unit Tester view
GTM-xxx1 GTM-xxx2 GTM-zzzz GTM-xxxx
34. GTM user access audit
bit.ly/gtm-access-sheet2 << Example Tools
35. Summary of safety features
1. 2 stage authentication
2. PII protection - via GA filter on URI & eventLabel
3. JS error tracking profile
4. Inline switch for GTM-DEV / GTM-LIVE
(can be client-side or serverside method)
5. Failsafe/deadmans switch (dataLayer whitelist)
Info hidden on Demo slides
42. Project Learnings/Improvements
1. Remove "human factor"
(e.g. manual export from DEV to LIV)
2. Auto-QA change to use TagID and auto-detect if new GA event added
in GTM.
3. Enforce GTM audit at the beginning (not optional task)
4. Enforce a Project summary and feedback session at the end of every
phase (not optional task)
5. Move onto insight, dashboards, A/B testing or BigQuery sooner.
Hidden in taster slides
44. Thankyou & Questions
Phil Pearce
Senior Web Analyst and GTM specialist
phildpearce@gmail.com
linkedin.com/in/philpearce
Web
Analytics
Exchange
mentor
750 GA
questions answered
Tracking
protection
group
Free Prize for the best question(s).