Date post: | 13-Feb-2017 |
Category: |
Data & Analytics |
Upload: | phil-pearce |
View: | 1,304 times |
Download: | 0 times |
#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
I`m an Analytics Adventurer & Explorer!
I recently did 8 countries in 12 weeks = 4.6 days per country
Agenda 1. Set the scene
– Size – Complexity – Timelines
2. How we got there – Tools – Strategy
3. Conclusion & take always – Checklist – Solution Library
4. Questions
“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
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!
Project Complexity
Source: builtwith.com/detailed/behemothclient.com
Over 6+ CMS platforms & multiple analytics solutions!
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
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 Mistakes Wins Mistakes
GTM auto-event config file
Reminder: open the import files in notepad, then find & replace “yourdomain” and “yourdomain\\.com” with YOURDOMAIN before import.
Download Link removed in Taster slides
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
PII prevention filters PP01a: TidyURL - Replace email with [email protected] (start of string) URL (.*?)(=|%3D)([a-zA-Z0-9_.+\-]+(@|%40)[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+)($|&.+)
Output URL [email protected]$A5
PP01b: TidyURL - Replace email with [email protected] (end of string) URL (.*)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)($|&.+)
Output URL [email protected]$A5
PP02a: Tidy EventLabel - Replace email with [email protected] (start of string) EventLabel (.*?)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)($|&.+)
Output EventLabel [email protected]$A5
PP02b: Tidy EventLabel - Replace email with [email protected] (end of string) EventLabel (.*)(=|%3D)([a-zA-Z0-9_.+-]+(@|%40)[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)($|&.+)
Output EventLabel [email protected]$A5
RegEx filter hidden in taster slides
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
[email protected] Administrator manage users edit publish
[email protected] Tester view
[email protected] Administrator manage users view view
[email protected] Administrator manage users view view
[email protected] Tester view view
[email protected] Tester view
When Check-out set to read-only
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
[email protected] Administrator Implementation Specialist manage users edit publish view view
[email protected] Tester Project Manager view
[email protected] Administrator Systems Admin manage users view view view view
[email protected] Administrator Analyst manage users view view publish view
[email protected] Publisher Marketing Manager view view publish
[email protected] Tester Robot Unit Tester view
GTM-xxx1 GTM-xxx2 GTM-zzzz GTM-xxxx
GTM user access audit bit.ly/gtm-access-sheet2
<< Example Tools
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
Exceeded monthly hit limit!
Note: Hit Tiers above has changed after this project was completed, so there`s now more granular tiers.
$$$
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
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'] );
plus.google.com/117298997433687198127/posts/McER3buexek
Code hidden in taster slides
https://plus.google.com/117298997433687198127/posts/R5r3Bp88ir7
Creative solution: Enable cross-domain tracking in the Cart funnel without IT dept involvement
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
Thankyou & Questions Phil Pearce Senior Web Analyst and GTM specialist
linkedin.com/in/philpearce
Web
Analytics
Exchange
mentor
750 GA
questions answered Tracking
protection
group
Free Prize for the best question(s).
bit.ly/gtmdevguide2 (free) Prize: GTM developer guide
free!! bit.ly/gtmdevguide2
GTM benefits Slides: bit.ly/gtmbenefits
SEO dataLayer Slides: bit.ly/supercharge-ctr
working example: bit.ly/seo-jsonld GTM import file: bit.ly/json-v2
CheatSheet: bit.ly/jsonld-cheatsheet
Templates for Agencies (SEO, PPC, Analytics, GTM)
bit.ly/analyticstemplates
Free tools & Tips (YandexMetrica, Quill, Google Surveys)
Slides: bit.ly/toolsandtips
Top 10 GA reports to save you money
Slides: bit.ly/top10gareports Report links: bit.ly/ga-report-list