How To Add A B Testing To Umbraco Website

Image of Stephen Garside Stephen Garside | Mon 13 Jul 20 > 2 min read

A/B testing and Multivariate testing is a great way to gradually improve your Umbraco website pages based on actual user feedback, and with just 1 line of code!  The following approach will allow A / B and Multivariate testing for any website including those created with Wordpress, Kentico, Sitecore and any other CMS you care to mention.

So, here is how to add A/B and Multivariate testing to an Umbraco website:

  1. Create a free account for Google Optimize.
  2. Link your new Google Optimize account to your Google Analytics account.
  3. Install the Google Optimize Chrome extension.
  4. Create your first simple A / B test using the simple Optimize user interface.
  5. Add a single line Code Snippet to your website Master Template page.
  6. Start the Test.
Ubraco Website Testing With Google Optimize

What is Google Optimize

Google Optimize has been around since 2015, was offered as a free product from 2017, and replaced Google Experiments in 2019.  Optimize is an, easy to use digital marketing tool and requires zero coding skills, except the addition of a single line of code to your Umbraco website master page template.  Features include the ability to create A / B tests, Multivariate tests and user personalisation based on Google Analytics data such as Geo Location, Demographic etc.  

In a nutshell, Optimize stores a series of HTML / CSS Style changes you make in their GUI, and then applies them at run-time to segments of users, whilst recording the results of their interactions.  Permanent style and content changes can then be made to your Umbraco website using actual customer interaction data.

A typical use-case for Optimize and Umbraco AB testing might be to test which colour of 'Buy Now' button converts better.  Using Optimize, you identify the button on your page and then choose the two colours you want to test and leave Optimize to gather the data for you. 

Step 1 - Create Free Optimize Account

This first step to adding A / B testing to your Umbraco website is easy, simply head to Google Optimize and sign up for a free account.

Step 2 - Link Optimize to Google Analytics

Once you have sign up for Optimize, you will be asked to link your Optimize account to a Google Analytics account.  This allows you to utilise measures and goals from your Analytics account to measure the success of your A / B and Umbraco Multivariate tests.  If you are already logged into your Google account this is as simple as picking your Analytics property from a drop down list.

Step 3 - Install Optimize Chrome Extension

Optimize requires you to install the free Chrome Optimize extension.  Installation takes about 10 seconds, after which you can interact with the Umbraco web pages you wish to experiment with.  The extension makes web page element selection easy, and provides a simple user interface that allows you to create content variations for your A / B tests

Adding Optimize A B Tests To Umbraco Website

Step 4 - Create Optimize A / B Test

Optimize uses a simple A / B test creation wizard, in which you select elements of your Umbraco web pages to vary between users.  This can be any element in a web page including buttons, text, images etc. If you can click on it you can include it in your test.

Step 5 - Add one Line of Code To Your Website

This is the bit I love about Optimize - its simplicity!  To get A/B and Multivariate testing working on your Umbraco website you add a single code snippet to your Master / Template page - thats it!.  The snippet is provided in your Optimize portal and looks similar to the following:

<script src=""></script>

This snippet should be added to the <head> section of your Umbraco / Kentico / Sitecore website page template.

Step 6 - Start Your A / B Test

The final is to start your test and monitor the results in your Optimize portal. That is all there is to adding A / B and Multivariate testing to your Umbraco website!


If you want any help or advice on how to set up simple A / B and Multivariate testing on your Umbraco, Wordpress, Kentico or SiteCore website then get in touch.

Leave Your Comments...