Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
SET UP (AND 
ANALYZE) YOUR 
A/B TESTS LIKE A 
BOSS 
USING THE GOOGLE TAG MANAGER 
JULES STUIFBERGEN – CONVERSION HOTEL 201...
TOPICS FOR THIS 
SESSION 
• Two ground rules 
• The added value of commercial tools 
• What type of A/B tests am I talking...
A/B TESTING RULE 1: 
RANDOMNESS 
Visitors enter your experimentation zone 
They’re assigned to a 
variation (A or B) 
rand...
A/B TESTING RULE 2: 
CONDITIONS STAY THE SAME 
Visitors are in the same condition, always. 
Condition A 
Condition B
THE ADDED VALUE OF 
COMMERCIAL TOOLS 
Optimizely VWO
THESE TOOLS DO 2 
THINGS REALLY WELL 
UGLY code Fancy GUI
WHAT TYPE OF TESTS 
AM I TALKING ABOUT 
• Same URL / page group 
• Content manipulation with Javascript / jQuery 
Meet jQu...
LET’S REPLICATE THE 
LOGIC 
Pseudo code for a visitor entering the experiment 
1. Does the visitor have a valid cookie? 
1...
READY TO CODE 
YOUR TAG?
DETAILS: CONFIG 
This code allows 
endless amount of 
variations. 
One cookie per test
DETAILS: 
ASSIGNMENT 
In words: 
If the cookie value is not in the 
list of the variation names: 
Pick a random variation.
DETAILS: COOKIE 
Set the cookie, always. 
This makes sure the cookie is renewed for 90 days 
(code stolen from the interwe...
DETAILS: THE FUN 
STUFF 
This is where the 
GTM magic begins. 
abtest macros for 
category, action and 
label (from datala...
DETAILS: THE FUN 
STUFF 
This is where the 
GTM magic begins. 
Built-in event macro, 
to trigger the action
RULE NR. 1 
Fires on all abtest 
events
MEASURE LIKE A 
BOSS
RULE NR. 2 (AND 3..) 
Fires variation 
code
CODE LIKE A BOSS
OR.. CHEAT LIKE A 
BOSS 
Steal (and clean) 
optimizely’s code using 
the “edit code” 
functionality
START YOUR 
EXPERIMENT 
This goes in a Tag 
Activated by a 
Rule
DEBUG YOUR 
CONTAINER VERSION 
LIKE A BOSS
WELCOME VISITORS.. 
http://datadatadata.nl/ch2014.html
AND ANALYZE THE 
RESULTS 
Use Google Analytics User 
Segments on Events
YOU WIN!
THANK YOU 
Jules Stuifbergen 
@zjuul
Create A/B tests with the Google Tag Manager
Create A/B tests with the Google Tag Manager
Upcoming SlideShare
Loading in …5
×

Create A/B tests with the Google Tag Manager

25,835 views

Published on

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

Published in: Technology

Create A/B tests with the Google Tag Manager

  1. 1. SET UP (AND ANALYZE) YOUR A/B TESTS LIKE A BOSS USING THE GOOGLE TAG MANAGER JULES STUIFBERGEN – CONVERSION HOTEL 2014
  2. 2. 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!
  3. 3. 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.
  4. 4. A/B TESTING RULE 2: CONDITIONS STAY THE SAME Visitors are in the same condition, always. Condition A Condition B
  5. 5. THE ADDED VALUE OF COMMERCIAL TOOLS Optimizely VWO
  6. 6. THESE TOOLS DO 2 THINGS REALLY WELL UGLY code Fancy GUI
  7. 7. WHAT TYPE OF TESTS AM I TALKING ABOUT • Same URL / page group • Content manipulation with Javascript / jQuery Meet jQuery. A big fat Javascript library
  8. 8. 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
  9. 9. READY TO CODE YOUR TAG?
  10. 10. DETAILS: CONFIG This code allows endless amount of variations. One cookie per test
  11. 11. DETAILS: ASSIGNMENT In words: If the cookie value is not in the list of the variation names: Pick a random variation.
  12. 12. DETAILS: COOKIE Set the cookie, always. This makes sure the cookie is renewed for 90 days (code stolen from the interweb)
  13. 13. DETAILS: THE FUN STUFF This is where the GTM magic begins. abtest macros for category, action and label (from datalayer)
  14. 14. DETAILS: THE FUN STUFF This is where the GTM magic begins. Built-in event macro, to trigger the action
  15. 15. RULE NR. 1 Fires on all abtest events
  16. 16. MEASURE LIKE A BOSS
  17. 17. RULE NR. 2 (AND 3..) Fires variation code
  18. 18. CODE LIKE A BOSS
  19. 19. OR.. CHEAT LIKE A BOSS Steal (and clean) optimizely’s code using the “edit code” functionality
  20. 20. START YOUR EXPERIMENT This goes in a Tag Activated by a Rule
  21. 21. DEBUG YOUR CONTAINER VERSION LIKE A BOSS
  22. 22. WELCOME VISITORS.. http://datadatadata.nl/ch2014.html
  23. 23. AND ANALYZE THE RESULTS Use Google Analytics User Segments on Events
  24. 24. YOU WIN!
  25. 25. THANK YOU Jules Stuifbergen @zjuul

×