"taster slides" for most advanced gtm implementation

46
#emetrics @PHILPEARCE New York 26 th 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

Upload: phil-pearce

Post on 21-Apr-2017

1.368 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: "Taster Slides" for Most advanced GTM implementation

#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

Page 2: "Taster Slides" for Most advanced GTM implementation

I`m an Analytics Adventurer & Explorer!

I recently did 8 countries in 12 weeks = 4.6 days per country

Page 3: "Taster Slides" for Most advanced GTM implementation

Agenda 1. Set the scene

– Size – Complexity – Timelines

2. How we got there – Tools – Strategy

3. Conclusion & take always – Checklist – Solution Library

4. Questions

Page 4: "Taster Slides" for Most advanced GTM implementation

Last week I did a twitter survey….

Page 5: "Taster Slides" for Most advanced GTM implementation

“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

Page 6: "Taster Slides" for Most advanced GTM implementation

AdWords …I have done alot more than 10 GTM & GA Implementations

Page 7: "Taster Slides" for Most advanced GTM implementation

This is the story of

one such implementation…

Page 8: "Taster Slides" for Most advanced GTM implementation

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!

Page 9: "Taster Slides" for Most advanced GTM implementation

Project Complexity

Source: builtwith.com/detailed/behemothclient.com

Over 6+ CMS platforms & multiple analytics solutions!

Page 10: "Taster Slides" for Most advanced GTM implementation

Project Size

Huge site!

Number of pages indexed on Google

2,680,000 results

350,000 results

Page 11: "Taster Slides" for Most advanced GTM implementation

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

Page 12: "Taster Slides" for Most advanced GTM implementation

3 month Deadline…

If missed = financial penalties per task!

Page 13: "Taster Slides" for Most advanced GTM implementation

In Reality…

Inhouse IT dept slow to respond, thus impossible to enforce the task based fines.

Page 14: "Taster Slides" for Most advanced GTM implementation

How did we get to the Summit?

And more importantly...

• What went right?

• What went wrong?

Page 15: "Taster Slides" for Most advanced GTM implementation

The Win was deliver by Technical & Tactical working together!

Business Technical

Page 16: "Taster Slides" for Most advanced GTM implementation

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

Page 17: "Taster Slides" for Most advanced GTM implementation

Tools

Technical

Page 18: "Taster Slides" for Most advanced GTM implementation

GA classic >> GA universal

migration comparison +/-2%

Download Link removed in Taster slides

Page 19: "Taster Slides" for Most advanced GTM implementation

Auto-QA for lots of GA events

Download Link removed in Taster slides

Page 20: "Taster Slides" for Most advanced GTM implementation

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

Page 21: "Taster Slides" for Most advanced GTM implementation

Separate GTM-live & GTM-Dev

Page 22: "Taster Slides" for Most advanced GTM implementation

1. Server-side switch example

Code hidden in taster

slides

Page 23: "Taster Slides" for Most advanced GTM implementation

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

Page 24: "Taster Slides" for Most advanced GTM implementation

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

Page 25: "Taster Slides" for Most advanced GTM implementation

Local Test Environment "Strawman unit tests"

Page 26: "Taster Slides" for Most advanced GTM implementation

Local Test Environment

Click to switch versions

Demo Link removed in Taster slides

Page 27: "Taster Slides" for Most advanced GTM implementation

Tactical (Business)

Business

Page 28: "Taster Slides" for Most advanced GTM implementation

Resource Planning Gantt (The "Who")

Download Link removed in Taster slides

Page 29: "Taster Slides" for Most advanced GTM implementation

Milestones & Deadline planning (The "When")

Download Link removed in Taster slides

Page 30: "Taster Slides" for Most advanced GTM implementation

Preliminary assessment of Scale of Task…

GTM audit Download Link removed in Taster slides

Page 31: "Taster Slides" for Most advanced GTM implementation

Governance: Controlling multiple-user changes...

...whilst plane is in mid-flight!

Page 32: "Taster Slides" for Most advanced GTM implementation

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

Page 33: "Taster Slides" for Most advanced GTM implementation

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

Page 35: "Taster Slides" for Most advanced GTM implementation

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

Page 36: "Taster Slides" for Most advanced GTM implementation

Unexpected avalanches...

Page 37: "Taster Slides" for Most advanced GTM implementation

Exceeded monthly hit limit!

Note: Hit Tiers above has changed after this project was completed, so there`s now more granular tiers.

$$$

Page 38: "Taster Slides" for Most advanced GTM implementation

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

Page 39: "Taster Slides" for Most advanced GTM implementation

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

Page 40: "Taster Slides" for Most advanced GTM implementation

https://plus.google.com/117298997433687198127/posts/R5r3Bp88ir7

Creative solution: Enable cross-domain tracking in the Cart funnel without IT dept involvement

Page 41: "Taster Slides" for Most advanced GTM implementation

Automatic Process Summary

Page 42: "Taster Slides" for Most advanced GTM implementation

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

Page 43: "Taster Slides" for Most advanced GTM implementation

Checklist of Tools

Removed from taster slides

Page 44: "Taster Slides" for Most advanced GTM implementation

Thankyou & Questions Phil Pearce Senior Web Analyst and GTM specialist

[email protected]

linkedin.com/in/philpearce

Web

Analytics

Exchange

mentor

750 GA

questions answered Tracking

protection

group

Free Prize for the best question(s).

Page 45: "Taster Slides" for Most advanced GTM implementation

bit.ly/gtmdevguide2 (free) Prize: GTM developer guide

free!! bit.ly/gtmdevguide2