33
Google Tag Manager

Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Embed Size (px)

DESCRIPTION

Don't miss the next year of Marketing Festival Brno - http://www.marketingfestival.cz You can also buy a video of this presentation at marketingfestival.cz

Citation preview

Page 1: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Google Tag Manager

Page 2: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

#GTMadvanced #MktFest

Web Analytics Exchange

mentor

750 GA questions answered

Tracking protection

group

WelcomePhil PearcePPC and Analytics ExpertFreelancer@[email protected]/in/philpearce

Page 3: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Please download:bit.ly/gtmdevguide

And join GTM community on Google+bit.ly/gtmcommunity

Page 4: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Fun fact... I`m almost Unique

Twin brother

Page 5: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Agenda1. Intro2. Definition3. Caching4. Logins & Access

levels5. Account structure6. Tags7. Macros8. Rules9. Examples10. Debugging

– Preview & Debug– Tag assistant

11. DataLayer– Onload

(ecommerce)– Onclick (event)

12. Power Examples13. GTM certification14. Questions

• Start: 12:00am

• Basic Examples: 12:20am

• Advanced Examples: 12:40am

• Interactive demo: 1pm

• Questions:1:30pm

• Finish: 2pm

Page 6: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Q: How many GTM installations have YOU done?

Newbie - 1-2 installationExperienced - 3-4 installationAdvanced - 4+ installation

Page 7: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Q: What is the load order of these?

B)1. gtm.js2. gtm.dom3. gtm.load

A)1. gtm.js2. gtm.load3. gtm.dom

Tip: See Firebug > DOM for dataLayer

Page 8: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Answer “B”

B)1. gtm.js2. gtm.dom3. gtm.load

Page 9: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

AdWords

I am on my 8th installation...

Page 10: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Session Goals1. Enable GTM on a website2. Know how to debug GTM3. Know what the difference between a macro and rule is.4. Know what the dataLayer is.5. Know common mistakes & answers.6. Learn from my mistakes from MY mistakes from 8

installations.

Page 11: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

But first…

Why use a TagManagmentSystem?

Page 12: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Because of Cats

Page 13: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Four ways to skin a cat

Beta Universalga(send{pageview})

Faster Asyncgaq.push(["pagetracker")

GTMdataLayer.push({"page_virtual":""});

LegacypageTracker()

Page 15: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Planning GTM

bit.ly/gtmdevguide

Page 16: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Basic Functions

Containers and Tags

Page 17: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

First Steps

1.Creation of Google account

2.Open a GTM account

3.Set up a GTM container

4.Add GTM script to your website source code

Page 18: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

E.g. URL

Ways to fire tags on GTM

Macros• Runtime Values

Rules• Condition that

evaluates to either true or false at runtime

Tags• HTML code that

executes on a page

Rules define which pages will receive tags.E.g. Pages with Thanks in URL

Scripts to be pushed on website according to rules and macros

Page 19: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Example of a tag

Scripts to be pushed on website according to rules and macros

Tags• HTML code that

executes on a pageSends data about URL

to Google Analytics for all pages loaded

Page 20: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Advance Functions

DataLayers and evaluate tags

Page 21: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Variables Values

page_virtual /en/home

page_group homepage

Variables you want to collect and their different values

DataLayers

Note: Use lowercase please

Page 22: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

One macro for one variable of your Data Layer.E.g. Macro Brand for variable Brand

Tags with Data Layer

Macros• Runtime Values

Rules• Condition that

evaluates to either true or false at runtime

Tags• HTML code that

executes on a page

Rules define which pages will receive tags.E.g. Pages with Thanks in URL

Scripts to be pushed on website according to rules and macros

Page 23: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Preview Mode

•Visit website and see how tags are firing•Checked if they are firing correctly•Preview is only for your google log in

Page 24: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Publishing

•Only admin users can publish

Page 25: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Account permissions example

Page 26: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

dataLayer is called a “macro” in GTM

•Macro are based on dataLayer variables.

•E.g. language variable

Page 27: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Rules

•Rules depend on your tag.•Rules can be

• All pages• Thank you pages• Pages with cars• Pages with accessories…

• Here an example of a rule for conversion data.

Page 28: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

•Easy to do...

How to push a customHTML tag

Page 29: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

1. Login using your Google Account

2. Search for “google tag manager”3. Add Google Analytics Tag with UA-000-14. Create & publish version5. Click Preview & debug

Demo

https://www.google.com/tagmanager

Page 30: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Other Demo ExamplesDebugging

GTM Preview & DebugGTM Debug console modeChrome Tag assistant

DataLayerOnload (ecommerce)Onclick (event)

GTM certification

Page 31: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Thankyou

Page 32: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

http://search4phil.com/gtm-demo/guest1/index.htmlhttp://search4phil.com/gtm-demo/guest2/index.htmlhttp://search4phil.com/gtm-demo/guest3/index.html

Appendix

Page 33: Phil Pearce - Workshop: Google Tag Manager for Advanced Users

Cheat sheet