Transcript
Page 1: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

THE NEW

Shuki [email protected]

GTMIS

+ WP + GA

Page 2: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

ME

• 28, Married + 2 • Road bike rider• B.s.w• M.B.A• Google Partner & Google Analytics

Qualified• Google Adwords• Google Analytics• Google Tag Manager• Google Facebook• Google Wordpress :)• etc.

Page 3: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

MEASUREMENT MODEL THAT WORKS !!!

1. What is your business trying to do?2. What are your goals?3. KPIs4. Define “success”5. Segment

5X3:A - AcquisitionB - BehaviorC - Conver$ion$$$

Page 4: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

MEASUREMENT MODEL THAT WORKS !!!

1. What is your business trying to do?2. What are your goals? (SMART:

Specific Measurable Achievable Relevant Time-bound)

3. KPIs4. Define “success”5. Segment

5X3:A - AcquisitionB - BehaviorC - Conver$ion$$$

EBAY

sell productsattract sellers

• more visitors (panda 4.0?)• more returning buyers• satisfied customers

• increase customer spend per order

• incentives• conference

• more products

• more non-branded traffic• newsletter open-rate

• more feedback/positive feedback

• faster support• avg. order value

• 20% more visitors from GOOG

• +10% signups, +2.3% open rate

• 4.5 stars avg. for each category

• traffic source• device

• day of visit• hour of day

• product price

Page 5: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

MEASUREMENT MODEL THAT WORKS !!!

Page 6: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

ACCOUNT STRUCTURE

google login

account

container A - client

A

container B - client

B

container C - client

C

Tags, Macros, Rules…

Tags, Macros, Rules…

Tags, Macros, Rules…

google login

account B - client B

container A - site

container B - lps

Tags, Macros, Rules…

Tags, Macros, Rules…

account A - client A

container C - shop

Tags, Macros, Rules…

container A - site

container B - lps

Tags, Macros, Rules…

Tags, Macros, Rules…

container C - shop

Tags, Macros, Rules…

Page 7: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

JSON array

key-value pair

GTM’s raison d'être

Before GTM snippet - dataLayer = [{‘key’:’value’}]

After GTM snippet - dataLayer.push({‘key’:’value’})

Layer with L

<a href=“www.paypal.com” onclick=“dataLayer.push({‘price’:’100’});”>100 ILS</a>

<a href=“www.paypal.com” onclick=“dataLayer.push({‘price’:’130’});”>130 ILS</a>

<a href=“www.other-site.com” onclick=“dataLayer.push({‘event’:’outbound’});”>Exit this site</a>

dataLayer

Page 8: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

• Google Analytics (Universal/Classic)Google Adwords ConversionCustom HTMLThird party platforms…Event listeners!!!

Tags are the “WHAT to do”

TAGS

Page 10: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

TAGS EXAMPLES

Custom Dimensions & Custom Metrics - The Full Guide

Page 11: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

CUSTOM DIMENSIONS (Yeah!)

Custom Dimensions & Custom Metrics - The Full Guide

Page 12: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

CUSTOM DIMENSIONS (Yeah!)

Custom Dimensions & Custom Metrics - The Full Guide

Page 13: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

CUSTOM DIMENSIONS

Custom Dimensions & Custom Metrics - The Full Guide

• ga(‘send’ , ‘pageview’, {‘dimension1’ : ‘author_name’ });ga(‘send’ , ‘pageview’, {‘dimension1’ :' <?php echo get_the_author();?> ' });<script> dataLayer = [{‘dimension1’ : <?php echo get_the_author();?>}]

<script>

Page 14: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

CUSTOM DIMENSIONS

Custom Dimensions & Custom Metrics - The Full Guide

Page 15: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

CUSTOM DIMENSIONS

Custom Dimensions & Custom Metrics - The Full Guide

Page 16: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

TAGS EXAMPLES

• Adwords Remarketing with custom params from dL

Adwords Conversion with dynamic value (macro)

Page 17: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

TAGS - Auto Event Listeners

• Link Click - <a href> -> gtm.linkClick eventClick - onclick -> gtm.click eventForm Submit - submit -> gtm.formSubmitTimer - gtm.timerJS - gtm.pageErrorHistory - AJAX

Case sensitive!Competing listeners<html> <head>

<title>My Page</title> </head> <body> <!-- Google Tag Manager Container here --> <div id="main">

<a id=“A” href=“http://www.A.co.il”>A</a> <a id=“B” href=“http://www.B.co.il”>B</a>

</div></body>

</html>

Page 18: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

JSON array

key-value pair

GTM’s raison d'être

Before GTM snippet - dataLayer = [{‘key’:’value’}]

After GTM snippet - dataLayer.push({‘key’:’value’})

Layer with L

<a href=“www.paypal.com” onclick=“dataLayer.push({‘price’:’100’});”>100 ILS</a>

<a href=“www.paypal.com” onclick=“dataLayer.push({‘price’:’130’});”>130 ILS</a>

<a href=“www.other-site.com” onclick=“dataLayer.push({‘event’:’outbound’});”>Exit this site</a>

dataLayer

Page 19: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

TAGS - Auto Event Listeners - Example• <html> <head>

<title>My Page</title> </head> <body> <!-- Google Tag Manager Container

here --> <div id="main">

<a id=“A” href=“http://www.A.co.il”>A</a>

<a id=“B” href=“http://www.B.co.il”>B</a>

</div></body>

</html>

Page 20: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

TAGS - Auto Event Listeners

Page 21: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

TAGS - Auto Event Listeners

Page 23: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

RULES

• [macro][operator][value]contains, equals, matches RegEx2 condition, same rule = AND2 different rules = ORGTM goes to dataLayer to find the

value of objects ONLY when they’re events.

Blocking Rule always win1st: gtm.js2nd: gtm.dom3rd: gtm.load

Rules are the “WHEN to do”

Page 24: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

MACROS

• = FunctionsMust return a value with “return”You can even use the macro inside

your HTML tag!Exactly like regular function.Every Macro return value. JS Macro

must include “return”Auto event - the DOM element that

triggered the event.

Page 25: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

MACRO EXAMPLES

• Constant String - very useful for GA/Adwords code

Page 26: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

MACRO EXAMPLES

• Constant String - very useful for GA/Adwords code

HTML tag with macroAuto-Event vars

Page 27: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

MACRO EXAMPLES

• Constant String - very useful for GA/Adwords code

HTML tag with macroAuto-Event varsLookup Table!!

Page 28: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

MACRO EXAMPLES

• Constant String - very useful for GA/Adwords code

HTML tag with macroAuto-Event varsLookup Table!!dataLayer!!!!!

Page 32: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

REAL EXAMPLE - eCommerce Tracking

Page 33: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

REAL EXAMPLE - eCommerce Tracking

Page 34: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

REAL EXAMPLE - 4

Page 35: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

REAL EXAMPLE - 4

<script>dataLayer = [{'post_title' : '<?php echo get_the_title();?>’ }]</script><!-- GTM Code -->

Page 36: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

dataLayer = [{ 'gtm.blacklist': ['<html>', '<nonGoogleScripts >', ...] 'gtm.whitelist': ['<ID>', '<class>', '<ID>', ...]}];

Black wins!Classes have relationships (nonGooglePixels >

nonGoogleScripts)

SECURITY

Page 37: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

Tags: Category - Type - what it does (meaningful)

ex: GA - Event - click on menu item

ex: Adwords - Conversion - 10x pages

Macro: Type - what is does

ex: Lookup Table - change A macros by B

Rules - Where/When it happens

ex: All pages, event equals

NAMING

Page 38: Google Tag Manager + Wordpress - Wordcamp 2014 Presentation

[email protected] www.booot.co.il

THE END

THANK YOU :)

contact me at: [email protected] my posts: www.booot.co.il

be my friend: www.facebook.com/mann.shuki


Top Related