shuki mann - lixfix (all things data 2015)

69
#ATDconf Google Tag Manager Awesomeness Shuki Mann @ShukiMann [email protected]

Upload: shuki-mann

Post on 12-Aug-2015

109 views

Category:

Marketing


1 download

TRANSCRIPT

Page 1: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

Google Tag Manager Awesomeness

Shuki Mann!!

@[email protected]

Page 2: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

What is Google Tag Manager?

Page 4: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

source: builtwith.com

GTM market share VS. other vendors

Page 5: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

GTM Corner Stones:

what to do

when to do

Page 6: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

–Avinash Kaushik

I.T.

Page 7: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Business Question

First of All - Implementation Process

Defining KPIs

Requirements

Implementation-

QA

Implementation-

Page 8: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

!The First Magic: Cohort Analysis by The Last Seen Post!

(in other words: how the last seen post affects the FTD!amount)

! Difficulty: 2

Page 9: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

What is “Cohort”Cohort analysis divides website users into groups (=cohorts) based on a common characteristic, and compares behaviour over time across those groups. !Cohort Types: • Date of first visit (retention by…) - default • Date of registration (churn rate by…) • Acquisition Campaign (sign ups by…) • App download date (in-app purchases by…) !and… • Last blog post they read (Avg. FTD amount by…)

Page 10: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

conversion rate by acquisition week

Problem: GA presents only “acquisition date” as the common characteristic.

Page 11: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Our Business Question:!!

Whats the effect of the last post the user has read on the FTD amount by the number of days

passed since reading that post

Page 12: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

FTD

!Implementation Plan!

1. While the user reads a post - save this post name to a cookie 2. …and also save the current date. 3. When the user is performing his FTD - take the date that was

stored to the cookie, calculate the days/weeks/months passed since that date and send that with GA transaction tag.

!4. What would happen if the user reads another post? It will overwrite

the stored information in the cookie, aka last click attribution. (It can easily be adjusted to first-click-attribution)

PostA PostB

Page 13: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

1. Create cookies with the post’s URL and its reading time

Page 14: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

2. Create variables to get these values from the cookies when the FTD occurs

Page 15: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

3. Create Custom JS Variable that calculates the days passed since the date stored in the cookie

Page 16: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

3. Create Custom JS Variable that calculates the weeks passed since the date stored in the

cookie

Page 17: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

3. Create Custom JS Variable that calculates the months passed since the date stored in the

cookie

Page 18: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

4. Create session-scoped custom dimensions in GA

Page 19: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

4. Write down their index numbers…

Page 20: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

5. Send transaction with the calculated

CDs values

Page 21: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Debugging with WASP inspector - all CDs are sent!

download chrome ext. from: bit.ly/wasp-inspector

Page 22: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Create Custom Report in GA! (in our case use only Average Order Value)

Page 23: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Export to Excel

Page 24: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

A little bit of Tableau work and…

Business insights (here comes the money): !1. After reading post3 you have an

opportunity window of 3 days to bring high valued FTDs

!2. Something interesting happens in the

second week after reading post1… We should investigate it further

Page 25: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Another example: save the affiliate name (instead of post name) and monitor his traffic deposits across the

following weeks

FTDAff 1 Aff 2

Page 26: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

So what did we have?!1. We wanted to see how different groups of the same users

behave across the timeline. !2. What defines “the same user”? In our case we are referring to

users that originated from a specific affiliate or read post X before their FTD.

3. When a user reads a post, we store the post name and reading date to a cookie.

4. When the user performs an FTD we retrieve the days+weeks+months since the last post reading date, and send it through custom dimension to GA (plus the post name of course).

5. We create a custom report in GA, export the data and visualise it in Tableau (or any other software).

Page 27: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

More examples !!

1. e-Commerce - Store the registration date and see how these users convert through time. Maybe you will find that users that registered because of X converted less than users that registered because of Y.

!2. Apps - in-app purchases by installation date.

Page 28: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

DONE

Page 29: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

! The Second Magic: Optimizing Internal Site

!Search

Difficulty: 3

Page 30: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Search Terms report in GA - we have lots of usersthat didn’t find what they’ve searched for

#FAIL

Page 31: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Action Plan!!1. Grabbing the search term query from the URL !2. Return an HTML and inject it to the post’s feed code

for each search query

Business Goal!!

We want to provide more relevant search results or promote certain items that would of not been showed organically.

Page 32: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

When searching for “adwords” youwould see a boring post:

Page 33: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

…but after the injection, you can see a promoted post for my

AdWords Workshop

Page 34: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Step 1: grab the search query from the URL

Page 35: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Step 2: return a specific HTML code to inject for each search query:

Page 36: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Step 3: When the user is in the search results page - inject the returned

HTML to the main post feed (div withclass “columns” in our case)

Page 37: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

<div class=“columns”>…

Page 39: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Try it yourself: search for “adwords”

Page 40: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Try it yourself: search for “google analytics”

Page 41: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

But…!Lookup Table works only with “equals” operator. If someone is searching for “google adwords” and

not “adwords” it won’t work :-/

Page 42: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

until…

Page 43: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

RegEx Lookup Table

take the search look if the phrase in return the right cell

Page 44: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Take the returned value from our RegEx lookup table, and return the promoted

post HTML we want to inject

Page 46: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

What did we have so far?

Page 47: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Try it yourself: search for “adwords”

Page 48: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Try it yourself: search for “google analytics”

Page 49: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

Thank You :) !

All Things Data Rocks! !

[email protected]

Page 50: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

The Third Magic:!Fight with Gibberish URLs!

!

Difficulty: 3

Page 51: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

As seen on…

Page 52: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

How will these URLs look in the GA reports?!

Page 54: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

The problem:!Ecommerce shop with gibberish URLs - no way to analyse

with GA

alternatives before GTM:!!

1. 301 redirects (very risky) 2. Search & replace filters in GA (no way. thousands of products)

Page 55: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

What are we going to do? - Solution #1

We want to be able to see more meaningful URLs in GA reports !1. Grabbing the “ugly” parameter from the original URL with a

GTM variable (macro) !2. Replace this old parameter with a new and more

meaningful one !3. Send virtual pageview to GA with the new parameter

Page 56: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Grab the itemId parameter with URL-Query variable

Page 57: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Return a new itemId for each ugly itemId!for example: “{8317F274-701D-46A3-A8D1}” >>> “Blue T-shirt -

Men”

Page 58: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Solution #1: Lookup Tables

The lookup table takes the value from the {{Old Item Id}} variable, and returns a new value to the {{New Item Id}} variable. !“if {{Old Item Id}} value is “ItemA” return “NewItemIdA” to the New Item Id”

Page 59: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Create Custom JS Variable that returns the {{New Item Id}} !only if the ItemId is in the URL

Page 60: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Send the New Item Id with virtual PV within the GA tag

Page 61: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

But wait, we have 10,000+ products!!!

How can we create 10,000 rows more easily?

bit.ly/lookup-table-builder

Page 62: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Paste the code in the console and… hopa!

bit.ly/lookup-table-builder

Page 63: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Still - it takes a lot of time to create the lookup table, so I’ve looked for

an easier way

Page 64: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Solution #2: DOM scrapping

I need this part

Page 65: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

(Houston, you have duplicate GA tag)

Page 66: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Step 1: Custom JS variable to get the last element on the breadcrumbs

Page 67: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf#ATDconf [email protected]

Step 2: Fire GA tag with virtual PV

Page 68: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

DONE

Page 69: Shuki Mann - LIXFIX (All Things Data 2015)

#ATDconf

#ATDconf [email protected]

Thank You :) !

All Things Data Rocks! !

[email protected]