How-to 7 min read

How to do A/B testing with Google Analytics

A/B testing is a powerful marketing tool that allows you to obtain reliable data on the effectiveness of website element changes. Without prior A/B testing, changes on the website may cause a sharp outflow of the target audience.

What is A/B testing

A/B testing is a type of marketing research of Internet resources, the purpose of which is to choose the appropriate solution among other possible options. Such a study is also called as split testing.

With it two or more versions with modified fragments are tested. Based on the result of the website's AB testing, the two conversions of the unchanged original control group A and group B with some indicators changed are compared, for instance, "interface elements" or "call to action" are added.

One of the main advantages of A/B testing is that the website's development strategy is based on objective, not intuitive data. You can test the following items:

  • site color scheme;
  • page titles;
  • contextual advertising;
  • the design and color of the conversion button;
  • snippets;
  • texts on the page;
  • pop-ups;
  • online chat rooms;
  • pictures;
  • element location on the page and much more.

Features of the A/B-testing

  • First of all, you need to choose indicators that will be improved with the help of split testing, measure their current values and select target ones;

  • when carrying out A/B testing, users are divided into two groups, and each group sees only one version of the website. It is important to make sure that the visitor does not see two versions of the resource. At the same time, technically, the monitoring of displaying versions is carried out by memorizing the IP address of each user and entering this data into cookies;

  • dividing into groups is carried out respectively, taking into account the traffic source- organic search, contextual advertising, social networks;

  • In order to get the correct results, it is important to test two versions of the website in parallel at the same time, otherwise external factors like holidays, weekends, weather conditions may affect the statistics;

  • data on company employees is excluded from the sampling; this can be configured using Google Analytics filters. In this case, the reports do not include actions taken from the IP addresses of the project team;

  • you can use the calculator to calculate the minimum sampling;

  • for topics that require a long decision in order to make purchase should be tested for at least two periods needed for this decision. For example, if the decision is made on average in a month, then testing is carried out for two months;

  • the most significant parameter that shows the impact of changes is the number of completed orders. The increase in conversions at intermediate stages, such as the number of clicks on an ad, sign-ups, additions to the cart, may not affect the growth of orders;

  • after obtaining a sufficient number of results, we compare website conversions in both groups and select the one with higher rates.

A/B testing tools

For a split test, you need a tool that allows you to divide the website's audience into groups and calculate the values of the given indicators in each of them. You can do this yourself by analyzing the logs of the actions of visitors, or using specially designed tools. One of the most common ones is Google Analytics.

Google Analytics A/B Testing

A/B testing in Google Analytics is carried out in the following way:
Create a new page on the website.
Go to the "Experiments" subsection in Google Analytics, which can be found in the "Behavior" section:
Experiments in Google Analytics
Add a new experiment. Fill out the form by indicating the name and percentage of the traffic to experiment.

Then change additional settings: activate the uniform distribution of traffic between all the options, set the minimum time of the experiment 2 weeks and set the confidence threshold from 95% to 95.9% depending on the required accuracy of the results.

Also set the goal of the experiment: choose from the offered ones or create a new one. By default, the proposed goals associated with the website usage are: session duration, pageviews or bounces.
Creating a new experiment in Google Analytics
Objective for an experiment in Google Analytics
To set a goal yourself, choose the appropriate template - revenue, acquisition, inquiry, or your own goal:
Goal setup in Google Analytics
After setting the goal, we indicate the pages that will take part in the testing - the URLs of the original and modified versions:
Configuration of the experiment in Google Analytics
After adding the URLs of the pages, we get the code to add to the website, which needs to be inserted immediately after the opening <head> tag:
Experiment's code in Google Analytics
After adding the code to the site, you can start the experiment, and after a specified period, we will receive a winning page and a report with conversion rates.


Well-done A/B testing allows to make an objective conclusion about the need to change the selected parameters. Consider the following points in split testing:
The test objects are based on the hypothesis that it can increase the website conversion.
In order to obtain reliable results, A / B testing should be carried out with the display of different test options in the same time period. It is necessary that various factors, such as holidays, weather conditions, weekends do not distort the final result.

In this case, the actions of employees who have access to the resource should not be taken into account.
The groups should be divided proportionally on all grounds: traffic source, geographic location, devices used.
To test a tool that you plant to use for split-testing, use A/A testing comparing the page with itself. After testing and getting the information about an option that is more successful, it follows that the tool gives unreliable results.
Analyze a fairly large number of visits over a long period so that the error of the result was minimal.

This article is a part of Serpstat's Checklist tool
Checklist at Serpstat" title = "How to do A/B testing with Google Analytics 16261788311149" />
Checklist is a ready-to-do list that helps to keep reporting of the work progress on a specific project. The tool contains templates with an extensive list of project development parameters where you can also add your own items and plans.
Try Checklist now

Speed up your search marketing growth with Serpstat!

Keyword and backlink opportunities, competitors' online strategy, daily rankings and SEO-related issues.

A pack of tools for reducing your time on SEO tasks.

Get free 7-day trial

Rate the article on a five-point scale

The article has already been rated by 0 people on average out of 5
Found an error? Select it and press Ctrl + Enter to tell us

Share this article with your friends

Are you sure?

Introducing Serpstat

Find out about the main features of the service in a convenient way for you!

Please send a request, and our specialist will offer you education options: a personal demonstration, a trial period, or materials for self-study and increasing expertise — everything for a comfortable start to work with Serpstat.




We are glad of your comment
I agree to Serpstat`s Privacy Policy.

Thank you, we have saved your new mailing settings.

Report a bug

Open support chat
mail pocket flipboard Messenger telegramm