Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

"Taster Slides" for Most advanced GTM implementation


Published on

First 30 slides from this talk, full slides to be posted soon.

Published in: Data & Analytics

"Taster Slides" for Most advanced GTM implementation

  1. 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
  2. 2. I`m an Analytics Adventurer & Explorer! I recently did 8 countries in 12 weeks = 4.6 days per country
  3. 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
  4. 4. Last week I did a twitter survey….
  5. 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 Super Experienced people
  6. 6. AdWords…I have done alot more than 10 GTM & GA Implementations
  7. 7. This is the story of one such implementation…
  8. 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!
  9. 9. Project Complexity Source: Over 6+ CMS platforms & multiple analytics solutions!
  10. 10. Project Size Huge site! Number of pages indexed on Google 2,680,000 results 350,000 results
  11. 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
  12. 12. 3 month Deadline… If missed = financial penalties per task!
  13. 13. In Reality… Inhouse IT dept slow to respond, thus impossible to enforce the task based fines.
  14. 14. How did we get to the Summit? And more importantly... • What went right? • What went wrong?
  15. 15. The Win was deliver by Technical & Tactical working together! BusinessTechnical
  16. 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
  17. 17. Tools Technical
  18. 18. GA classic >> GA universal migration comparison +/-2% Download Link removed in Taster slides
  19. 19. Auto-QA for lots of GA events Download Link removed in Taster slides
  20. 20. GTM auto-event config file Reminder: open the import files in notepad, then find & replace Download Link removed in Taster slides
  21. 21. Separate GTM-live & GTM-Dev
  22. 22. 1. Server-side switch example Code hidden in taster slides
  23. 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 === '' || myHostname === 'localhost'){ myGTMID = 'GTM-xxx2'; // DEV } </script> <!-- Google Tag Manager --> <noscript><iframe src="//" 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= '//'+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer', myGTMID);</script> <!-- End Google Tag Manager --> Working example… Code hidden in taster slides
  24. 24. PII prevention filters PP01a: TidyURL - Replace email with (start of string) URL (.*?)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)($|&.+) Output URL $$A5 PP01b: TidyURL - Replace email with (end of string) URL (.*)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)($|&.+) Output URL $$A5 PP02a: Tidy EventLabel - Replace email with (start of string) EventLabel (.*?)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)($|&.+) Output EventLabel $$A5 PP02b: Tidy EventLabel - Replace email with (end of string) EventLabel (.*)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)($|&.+) Output EventLabel $$A5 RegEx filter hidden in taster slides
  25. 25. Local Test Environment "Strawman unit tests"
  26. 26. Local Test Environment Click to switch versions Demo Link removed in Taster slides
  27. 27. Tactical (Business) Business
  28. 28. Resource Planning Gantt (The "Who") Download Link removed in Taster slides
  29. 29. Milestones & Deadline planning (The "When") Download Link removed in Taster slides
  30. 30. Preliminary assessment of Scale of Task… GTM audit Download Link removed in Taster slides
  31. 31. Governance: Controlling multiple-user changes... ...whilst plane is in mid-flight!
  32. 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 Administrator manage users edit publish Tester view Administrator manage users view view Administrator manage users view view Tester view view Tester view When Check-out set to read-only
  33. 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 Administrator Implementation Specialist manage users edit publish view view Tester Project Manager view Administrator Systems Admin manage users view view view view Administrator Analyst manage users view view publish view Publisher Marketing Manager view view publish Tester Robot Unit Tester view GTM-xxx1 GTM-xxx2 GTM-zzzz GTM-xxxx
  34. 34. GTM user access audit << Example Tools
  35. 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
  36. 36. Unexpected avalanches...
  37. 37. Exceeded monthly hit limit! Note: Hit Tiers above has changed after this project was completed, so there`s now more granular tiers. $$$
  38. 38. Solution: renaming universal object “ga” to “ga2” A/B testing tool was sending GA event hits to all trackers on every page = 3x hits Answer Hidden
  39. 39. Set utmz cookie - so that inline gaq.push events still work, but don’t effect hitlimit Solution: _initData var _gaq = _gaq || []; _gaq.push( ['_setAccount', 'UA-1-1'], ['_addIgnoredRef', {{Page Hostname}} ], ['_addIgnoredRef', {{Page Hostname - www removed}} ], ['_setDomainName', {{jsm_setTopLevelDomain}} ], ['_setAllowLinker', true], ['_initData'] ); Code hidden in taster slides
  40. 40. Creative solution: Enable cross-domain tracking in the Cart funnel without IT dept involvement
  41. 41. Automatic Process Summary
  42. 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
  43. 43. Checklist of Tools Removed from taster slides
  44. 44. Thankyou & Questions Phil Pearce Senior Web Analyst and GTM specialist Web Analytics Exchange mentor 750 GA questions answered Tracking protection group Free Prize for the best question(s).
  45. 45. (free) Prize: GTM developer guide free!!
  46. 46. GTM benefits Slides: SEO dataLayer Slides: working example: GTM import file: CheatSheet: Templates for Agencies (SEO, PPC, Analytics, GTM) Free tools & Tips (YandexMetrica, Quill, Google Surveys) Slides: Top 10 GA reports to save you money Slides: Report links: