create a/b tests with the google tag manager

27
SET UP (AND ANALYZE) YOUR A/B TESTS LIKE A BOSS USING THE GOOGLE TAG MANAGER JULES STUIFBERGEN – CONVERSION HOTEL 2014

Upload: jules-stuifbergen

Post on 02-Jul-2015

2.544 views

Category:

Technology


5 download

DESCRIPTION

A Google Tag Manager recipe: how to set up a/b tests, and analyze the results

TRANSCRIPT

Page 1: Create A/B tests with the Google Tag Manager

SET UP (AND

ANALYZE) YOUR

A/B TESTS LIKE A

BOSS

USING THE GOOGLE TAG MANAGER

JULES STUIFBERGEN – CONVERSION HOTEL 2014

Page 2: Create A/B tests with the Google Tag Manager

TOPICS FOR THIS

SESSION

• Two ground rules

• The added value of commercial tools

• What type of A/B tests am I talking about

• Can we replicate this functionality (using GTM)

• For free

• For kicks

• Because we can!

• Let’s find out!

Page 3: Create A/B tests with the Google Tag Manager

A/B TESTING RULE 1:

RANDOMNESS

Visitors enter your experimentation zone

They’re assigned to a

variation (A or B)

randomly.

Then, they’re part of your

experiment.

Page 4: Create A/B tests with the Google Tag Manager

A/B TESTING RULE 2:

CONDITIONS STAY THE SAME

Visitors are in the same condition, always.

Condition A

Condition B

Page 5: Create A/B tests with the Google Tag Manager

THE ADDED VALUE OF

COMMERCIAL TOOLS

Optimizely VWO

Page 6: Create A/B tests with the Google Tag Manager

THESE TOOLS DO 2

THINGS REALLY WELL

Fancy GUIUGLY code

Page 7: Create A/B tests with the Google Tag Manager

WHAT TYPE OF TESTS

AM I TALKING ABOUT

• Same URL / page group

• Content manipulation with Javascript / jQuery

Meet jQuery. A big fat

Javascript library

Page 8: Create A/B tests with the Google Tag Manager

LET’S REPLICATE THE

LOGIC

Pseudo code for a visitor entering the experiment

1. Does the visitor have a valid cookie?

1. Yes: set the condition variable w/ cookie value

2. No: Roll a dice and assign condition A or B

2. Store the condition in the cookie

3. Load the code for A or B

1. Javascript / jQuery code

2. Google Analytics code

Page 9: Create A/B tests with the Google Tag Manager

READY TO CODE

YOUR TAG?

Page 10: Create A/B tests with the Google Tag Manager

DETAILS: CONFIG

This code allows

endless amount of

variations.

One cookie per test

Page 11: Create A/B tests with the Google Tag Manager

DETAILS:

ASSIGNMENT

In words:

If the cookie value is not in the

list of the variation names:

Pick a random variation.

Page 12: Create A/B tests with the Google Tag Manager

DETAILS: COOKIE

Set the cookie, always.

This makes sure the cookie is renewed for 90 days

(code stolen from the interweb)

Page 13: Create A/B tests with the Google Tag Manager

DETAILS: THE FUN

STUFF

This is where the

GTM magic begins.

abtest macros for

category, action and

label (from datalayer)

Page 14: Create A/B tests with the Google Tag Manager

DETAILS: THE FUN

STUFF

This is where the

GTM magic begins.

Built-in event macro,

to trigger the action

Page 15: Create A/B tests with the Google Tag Manager

RULE NR. 1

Fires on all abtest

events

Page 16: Create A/B tests with the Google Tag Manager

MEASURE LIKE A

BOSS

Page 17: Create A/B tests with the Google Tag Manager

RULE NR. 2 (AND 3..)

Fires variation

code

Page 18: Create A/B tests with the Google Tag Manager

CODE LIKE A BOSS

Page 19: Create A/B tests with the Google Tag Manager

OR.. CHEAT LIKE A

BOSS

Steal (and clean)

optimizely’s code using

the “edit code”

functionality

Page 20: Create A/B tests with the Google Tag Manager

START YOUR

EXPERIMENT

This goes in a Tag

Activated by a

Rule

Page 21: Create A/B tests with the Google Tag Manager
Page 22: Create A/B tests with the Google Tag Manager
Page 23: Create A/B tests with the Google Tag Manager

DEBUG YOUR

CONTAINER VERSION

LIKE A BOSS

Page 24: Create A/B tests with the Google Tag Manager

WELCOME VISITORS..

http://datadatadata.nl/ch2014.html

Page 25: Create A/B tests with the Google Tag Manager

AND ANALYZE THE

RESULTS

Use Google Analytics User

Segments on Events

Page 26: Create A/B tests with the Google Tag Manager

YOU WIN!

Page 27: Create A/B tests with the Google Tag Manager

THANK YOU

Jules Stuifbergen

@zjuul