A/B TESTING with Google Optimize

A – The Original, B – The experimental variant

A/B Setup can be implemented in several ways. It’s all about finding the best user experience on your product. You can control the experience with javascript, your backend systems or simply use an external tool that does it for you.

Why Google Optimize?

It’s a very powerful tool to play with your frontend designs. It also allows you to store/read cookies and give you in-depth analysis of your experiments on Google Analytics. This tool gives you all round information of your product’s performance in every experiment variant you create. You can divide your traffic deterministically to test specific sets of cohorts.


To begin A/B testing, set up your google optimize account and follow the instructions to install the scripts on your website. Connect your Google Analytics account at this point or before going live.

Installation Script – Preview

Create a new experience on Google Optimize and define the target URL for the experiment. The target URL is that page you want run your experiment on. If you’re testing a build on your local machine, you can set the target URL to localhost. You can also select redirect experiment to show a completely different page for a set of users.

Create Experience – Google Optimize

Add a Variant for the A/B experience. Once you’ve created it, click on edit button to setup your experiment.


Editing THE Variant

You can manipulate various elements of the UI like text, design, placement. Using features provided by optimize, you can override the original, change the colours of your CTA/Background. Sometimes, making a small change in the design of the CTA can also move the needle for the product.

Editor Screen

Optimize lets you play with every aspect of the elements in UI. You can also add custom javascript and CSS at a global level. If your websites has different interfaces on web and mobile, you can still use optimize to control the experience for various device types.


You can add page rules, custom audience targeting and various checks for running your experiment. Let’s say that your product requires authentication and you prefer showing some interface to only authorised users. Google Optimize allows you to write rules to provide that filter. These rules are set as global rules and can be reusable for other experiments as well.

Customize Audience


For testing the experiment on a local build or a test domain, set the editor page link to the URL where you want to test the experience. On clicking the preview option, you’ll see a dropdown listing the preview experiences. You can share the preview link with your colleagues or select the mode of preview you wish to test.

Note: This preview only works on google chrome or sites where cross-site cookies are enabled.

Set the objectives of your experiment after completing the A/B setup. Objectives can include goals created on your analytics account. New custom goals can be created specific to an experiment.

Objectives of Experiment

Go Live

Go live is the easiest part of the setup. Because experiments can also be scheduled in advance, you have full control over the release process. An A/B test can also be setup for a specific duration. You can view the performance in the reporting section after going live with the experiment.

Publish Steps

Analysing the results of an experiment is key to A/B testing. Higher the experiments, difficult it is to keep a track of the cohorts in those experiments. Since most SAAS products are built with analytics tools, viewing the results of experiments in these tools becomes important. Google Optimize experiments can also be added to those funnels. You can read the experiment data from global values of gaData in javascript. Refer this article to understand how to read this information.

To Conclude, setting up A/B testing is pretty easy with Optimize. It is a reasonably powerful service to setup A/B experiments at no cost. Several other tools on the market are Optimizely, VWO, Convert Experiments… with features like SDK integrations, better performance, version control, live support but no great product comes cheap.

 348 total views,  1 views today

How did you like the article?