You’ve heard it a few times before. You’ve been told that A/B testing is the sh-t. Main question now is, how do you get started and what are the tools you could / should use? My ambition here is to provide an “as platform-agnostic solution as possible”.
Ok, but where do I start?
It all depends on your “A/B test maturity level” of course. During this post I’m going to assume a business understanding of why and what to test.
If you’re not absolutely certain if you’ve got that covered I’d start out by creating a test hypothesis (Hypothesis creator by Conversionista) for everything that you’ve identified and then setting priorities.
Getting your business priorities in order is key!
Setting it all up
Here comes the second the assumption of the post. You need to be familiar with Google Tag Manager and Google Universal Analytics. You don’t have to be an expert, but at least find your way around the tools.
If you haven’t already, create accounts for Tag Manager, Universal Analytics and Optimizely. If you need help setting up Tag Manager, please go through the “Setup and Workflow (Web)” instructions over at Google.com. And if you need help setting up Universal Analytics, please visit “Set up Universal Analytics: An overview” at Google.com.
Setting up Optimizely is fairly straight forward and the actual implementation will be covered during this article.
Let’s get started, for real!
We’ll start out with Optimizely, where you’ll set up the actual A/B tests. After you’ve created you Optimizely account, go to the homepage and click settings. There you’ll find the code snippet in the box below the project ID.
As we’re doing this “The Tag Manager”-way you now need to head over to Tag Manager, create a new Custom HTML tag and paste the Optimizely snippet into the HTML field, click Continue and check All Pages, and the publish your changes. First hurdle passed, well done.
If you use my suggested setup with Tag Manager, Universal Analytics and Optimizely you won’t be able to use the built-in Analytics tag type in Tag Manager. You’ll have to create another Custom HTML tag. But you’ve mastered that already! This time head over to you Analytics account, get the tracking code snippet, and use that in the HTML field in your new Custom HTML tag in Tag Manager.
Now you need to add the Optimizely activation part. In your newly created Tag Manager Custom HTML tag add the following two rows of code just before the ga send row.
window.optimizely = window.optimizely || ; window.optimizely.push('activateUniversalAnalytics');
Now you’ve all set up to start creating Optimizely experiments on your website. Neat eh? All you need to do now is to create your first A/B test. Head over to Optimizely, click New Experiment, give your new experiment a name and a URL (aka where on your site do you wanna run your test?).
All you need to do now is to create the different test variations that you want to run. If you’re not a high-traffic website I’d keep the tests rather small in terms of number of variations. You’ll need traffic in order to determine a winner.
Other settings that might be of interest is traffic allocation, goals and audience.
And lastly I’ve added a bonus feature. Since you’re using Optimizely and Universal Analytics now, you really should feed your Analytics account with the highly valuable Optimizely data. And this is quite straight forward.
In your Optimizely experiment you choose a Google Analytics integration and then you choose a Custom Dimension id that you’re not already using, there are 20 available. Unless you’ve tinkered with the custom tracker part, just leave it empty.
Now head over to your Analytics account, admin, property, custom definitions and then custom dimensions. Now create a new custom dimension, name it “Optimizely Experiments”, choose session and save. The index number has to be the same as the number you entered in Optimizely.
Last step is to create a custom report that shows you the test results. Add whatever metrics you want together with your new dimension. And then add your shiny new custom dimension under Dimension Drilldowns. After that you add a regex filter that only includes traffic with your Optimizely experiment ID.
Time to sum it up
Ok, now it’s time to sum it all up. You should now have a fully functional A/B test setup using Google Tag Manager, Google Universal Analytics and Optimizely. All neatly integrated. Leave a comment below if there’s something in the process above that was tricky or right out misleading.
And lastly, good luck with the A/B testing!