How to Use Google Analytics Experiments for Webpage A/B Testing
Gone are the days when you have to struggle trying to figure out who had the idea for the right messaging, which images captivate your audience or even which colors make your users click. A/B testing tools take the guesswork out of marketing making only facts the true winner.
There are many paid tools for A/B testing including, optimizely, visual website optimizer, among others. Google Analytics offers a free alternative to split testing with Experiments formally known as Google Optimizer.
Setting up Experiments in Google Analytics.
- Create Your Variation Pages for the A/B Tests
Before proceeding with creating experiments in Google Analytics it is best if you have your webpages ready. Unlike some of the other paid A/B testing tools, you will need to create the variations of your original webpages yourself. This shouldn’t be that difficult because you can simply copy and paste the HTML content of your original page into a new page, make your desired changes create a second version. You can choose to name the webpages something like www.example.com/1 for the original version and www.example.com/2 for the second variation.
- Go to The Experiments Section
The first step in setting up experiments in your Google Analytics account is to find the experiments section. Google analytics has many different functionalities so it can be difficult at times to find what you are looking for if you don’t know what section it falls under. Luckily you can quickly search using the search box, or you can directly go to Experiments located under behavior in Google Analytics.
- Step 1: Creating The Experiments
Choose a Name
Now that you are in the experiment section it is time to create your experiments. Click the “create experiment” button for the experiment screen. Once you are in the experiment screen choose a name for the experiments. In this example I chose the name test experiment.
After choosing the desired name for the experiment, it is now time to choose your goals. You should have goals already set up in Google Analytics that you would like to track for the experiment or you can choose the create a new objective link to create a new goal.
Note: This step is mandatory, you cannot move to the next screen without setting a goal. You can choose to test different types of goals. For example, you could measure bounces instead of conversions (form fills or purchases).
Choose The Percentage of Traffic
Choosing the percentage of traffic that you want for your experiment pages is crucial. If you quickly want to determine the results from an A/B test you could choose to have 100% of your traffic going to the test pages. If you already have a page that produces high results but want to test some changes, you may want to give your test a lower percentage let’s say 20%. In that case, 80% of your visitors would see the original page(not in experiment) that you had that converts while 20% will see your new experiments. If your experiments fail to produce your desired results, you will not be risking losing many possible conversions.
Remember: The steps in digital marketing analytics are: measure goals→ report →analyze results→test →improve→repeat. You never stop improving even if you have a well producing website.
- Step 1: Advanced Options
By default the advanced section is hidden. To view the advanced options click the advanced options link. This opens up a screen with more customization options.
Experiment Traffic Distribution:
You can choose distribute traffic evenly or not. If you do not choose to distribute traffic evenly, then Google will analyze your traffic behavior and conversions using bandits. With this setting Google will look at your experiment data twice a day and make adjustments to your traffic. A variation that is performing well will get more traffic moving forward compared to a variation that doesn’t get a lot of traffic. To ensure accuracy, Google uses a statistical formula to make these determinations. Click here for more information on multi-armed bandit experiments
In my opinion Google’s dynamic adjustment of traffic should be used for web experiments that are not new since you may not get the chance to see the full picture. Choosing to display variations evenly can help you know that out of let’s say the 500 people who visited your website, version B had more conversions. Once you have made this determination with your first experiment you can continue with the improvement process by testing something else. At that time, you could decide to use the Google’s dynamic traffic setting if you choose.
In the advanced session you have the opportunity to choose how long you want your experiment to run. You have the chance to choose between 3 days, 1 week or 2 weeks. To be sure of your results, it’s best to choose the longest possible duration especially if you don’t have a high volume website.
Set Confidence Threshold:
You can choose to set the confidence threshold under the advanced options. The higher the confidence threshold the more accurate your results will be, however, it will take longer for Google to declare a winner.
- Step 2: Configuring Your Experiment
Add Website URLs
The second step in the setting up the experiments is to add your URL from the webpages that you will like to experiment. This step is pretty simple. In the preview section Google will show you a preview of the pages that you are testing. You have the option of consolidating the experiment for other content reports. This allows you to see the results of your experiment under the original URL. If you have dynamic URL parameters or URL query strings you don’t need to include it in the variation page. Click here to learn more about dynamic parameters. You have the option of adding up to 10 variations.
- Step 3: Setting Up Your Experiment Code
The third and final step in setting up your experiment involves setting up your experiment code. The experiment code is what allows Google to run the experiment and gather results. You cannot activate your experiment without adding the code. Firstly, you need to make sure that Google Analytics tracking is properly installed in the original and variation pages. If you are already using Google Analytics and inserted it in a way that it shows on all pages, then you don’t have to worry about this step. Add the experiment code to the opening of your website’s <head>…</head> tag. If you are not familiar with editing HTML you can choose to email the code to your webmaster to have that person do the installation.
Note: The experiment code needs to be added only to the original page and not both the original and variation pages. However, you need to make sure both your original and variation pages have the Google Analytics installed.
- Step 4: Review and Validate Your Setup
The final step in setting up your experiment is to ensure that the tracking codes are properly installed. In my example below, I didn’t install the tracking codes so you can see an error with no tracking code found. If you installed the tracking code this should read experiment code found for the original page and Google Analytics tracking code found for the variation page. And that’s it, you can turn on your experiment and have it start or you can save it for later if you are not ready to start running your experiment.
The key to running successful A/B tests is to not test too many elements at a time. You should test at least one or two different changes to ensure that you know why you are getting certain results. For instance, for a two-week experiment, you can decide to test your messages. The, once you find the message that converts, you can run another experiment to test the layout, different images etc. Happy testing!