What is an A/B split test? Well, to answer that let’s look at the problem that this method of testing tries to solve. Let’s say that you want to roll out a number of changes to your website/blog, such as layout changes or colour changes.
You shouldn’t make a decision based solely on your gut instinct because you want to see if a certain change will attract more visitors or if it has a negative effect on your website. What you basically do with A/B Split Testing is track to see how a change in your design affects number of views, conversions rates, etc. It’s a side-by-side comparison of your website’s performance powered by Google Analytics for WordPress.
Installing Google Analytics for WordPress
The first thing you need to do is have Google Analytics for WP installed. Within Google Analytics for WordPress you will find a tab called Content within which you will find another one called Experiments. You need to complete the field by filling in the URL of the page you want to test.
You will then need to choose a name for your test and pick an objective. This step is completed by clicking on the objective link of your choice. Analytics will track the number of visitors that are attracted to your page and see if your goals are being met.
Adding variations: Of course, your original page must be compared with a variation to see which one meets your objectives; therefore, which one is the better page. These pages need to first be created on your WP website and need to be accessible publicly.
Within the Google Analytics for WordPress you will get a code for each of the different versions of the pages, and the code will need to be embedded into the header of that page. You can do it manually, via the Manually Insert the Code button. Simply copy the codes and paste them in your header.php file.
<?php if (is_page($page_id)) : //Add Google Analytics Content Experiment ?> Paste content experiment code here <?php endif; ?>
The code must be edited – the $page_id must be replaced with the id of your original page.
Once completed, go back into your analytics page and click next. A verification will be run and if code is installed and readable then you can click Start Experiment to get the experiment to run.
Note: The other option is to use the Google Content Experiments plugin instead.
Data will start to be churned out after a sort amount of time has passed and visitors will be directed randomly to your pages. What happens is that once a visitor sees one page, he will continue to see that page variation (or the original) on further visits, which is how the experiment can output the data. Information will start to generate quite quickly, but you should let the experiment run for a considerable period of time before you can decide what variation of your theme/page is the better option for you.