A/B testing with Google Analytics Experiments for fun and profit

If you haven’t heard about Google Analytics then take a moment and slap yourself really hard. Now did that hurt? Good! But on serious note it’s hard to be in our industry and not to know what Google Analytics is, but thanks to huge financial backing and massive resources it’s getting more and more complex with each new release.

Not a lot of people know that you can do A/B testing with Google Analytics so in this blog post we’ll walk you though setting up your first experiment.

Why A/B test?

A/B testing (also known as split testing) is technique where multiple versions of the same page are created usually with small variations and compared to see which one performs better.

Imagine a board meeting where your marketing director says that everything needs to be pink (trust me it happens) because it’s the trend now and people will like the site more. Others disagree and a small unproductive argument ensues. With A/B testing you can test this hypothesis with creating two versions of the same page: one is pink coloured and another one is without colour change.

Next step is to drive equal amount of traffic to each version and compare results (conversion rate usually). Then print your report and finally get rid of pink colour like a boss!

Alright, enough with chit- chat – let’s get down to business.

Setting up goals

Before you proceed you need to make sure that you have set up goals on your website. This is crucial as it provides us with metric we can use to find out which variations that perform better.

Setting up goals can be really easy, but sometimes it might require a little bit more work. The last statement is especially true for mobile applications and e-commerce websites. If you’re unsure where to start then Google your content management system name with “Google Analytics conversion tracking”. For example if you’re using webshop addon for WordPress you could try googling: “Wordpress WooCommerce Google Analytics conversion tracking”. In most cases this yields reasonable information that will set you on the right path.

Oh we have forgotten to explain what goal tracking actually is. Oops! Goal tracking allows Google Analytics to know when the visitor performs a desired action on your site. The desired action can be (but are not limited to):

  • Newsletter signup
  • Clicking certain link
  • Buying something
  • Filling out contact form

The goals can also have monetary value. This is most common when you’re running an e-commerce site. Most e-commerce platforms have either built- in functionality in order to set up Google Analytics conversion tracking or this functionality can be easily added using plugins.

Let’s take a simple example of a B2B web site where main goal of the site is to get leads using contact form. In order to maximise return on investment for a marketing campaign we decided to test landing page (you do have landing pages right?) using A/B testing.

We create variation of the landing page that we named Variation 1. This variation has for example purposes bigger contact form. Everything else is same as in original version of the landing page.

When contact form is successfully filled (no matter if it’s done via original landing page or via variation) it will lead to /thankyou.html page. This page is not listed anywhere on the site and thus only way to get to it is to fill out a contact form.

Now let’s add a goal that will allow us to track when people fill out our contact form.

Navigate to goal management video in Google Analytics admin view as shown below:

google analitics


Add there “/thankyou.html” as a destination goal and click “Create goal”:

thanks goal

After a while (a day or so) you will start to see conversion tracking in your reports. Once you have verified that goal tracking works (go to Conversions->Goals->Overview to see conversion statistics) we can proceed to actual A/B testing.

This is a good time to give your self props and get that latte you’ve been craving since breakfast.

Creating an experiment

Navigate to experiment section of Google Analytics as shown below:



Give your experiment a good name and select goal (if you have multiple) that will be used to decide which variation performs better. Once you’re done click “Next Step”

In the next step provide URL of the original web page that variation will be compared to as well as URL of the variation page as shown below:


As you noticed there can be more then one variations (usually there are multiple variations). When ready click “Next Step”.

Adding the code

Once you’re done it’s time to add some code to original web page. Just send the code to your web-master or add it yourself (it’s not that hard). Once code is placed on the site click “Start Experiment”.


Once you experiment is running you can see statistics (usually after a few days). Statistics will look similar to screen below:


As you can see variant 1 in this case performs 24% better compared to the original. You can stop experiment when needed or you can let Google Analytics stop it once it has found a winner.

Why bother?

You might think that going from 0,46% conversion rate to 0,57% is not a big deal. A/B testing requires you to create variations, add code and so on. We can demonstrate impact using simple calculation below:


10000 daily visitors * 0,46 conversion rate = 46 conversions * 100€ average order size = 4600€

Variant 1

10000 daily visitors * 0,57 conversion rate = 57 conversions * 100€ average order size = 5700€

As you can see A/B testing is a great way to increase your bottom line without additional investing into marketing budget.

Still not convinced? Contact us and we’ll set you straight!

Have a great day and may conversions rain down on you daily 🙂

Audit your site