A/B testing predictions with Google Optimize

This section describes how to create an A/B test on Google Optimize and compare results for calls to action or campaigns with and without predictions.

Prerequisites

Google Analytics or Google Analytics 360 data source

This experiment requires that your ML models use the Google Analytics or Google Analytics 360 data source.

Google Analytics or Google Analytics 360 integration

Please see the setup guide for integrating with Google Analytics or Google Analytics 360.

Defining calls to action

Start by creating different calls to action on your website. At least two variants are required:

  1. Call to action with general message;
  2. Call to action (ex. pop-up) with specific message, to be displayed only to those users in a custom segment. This call to action can be triggered using an HTML attribute on the <body> tag, for example:
    <body data-morphl-assisted="1">

Configure A/B test on Google Optimize

Create and configure Google Optimize account

  1. Go to Google Optimize and create an account if you don't already have one.
  2. Add a new container
    Add a new container

Create Optimize experience

From your new container, add a new experience. Choose A/B test for the experience type.

Add a new experience Choose experience type

Add Optimize variants

  1. Add new variant. The Original will be added automatically.
    Add new variant
  2. Enter a new name for your variant
    Enter a new name for your variant
  3. Edit your variant
    Edit your variant
  4. Click the square button in the top left corner. Enter body as the Element Selector and choose Attribute from the drop down menu.
    Instructions
  5. In the pop-up window, set the Attribute as data-morphl-assisted and the Value as 1.
    Instructions
  6. Click the Save button in the top right corner to save your settings. Click the Done button to exit the variant edit window.

Link Google Analytics and generate script

  1. From your Optimize experience settings, click the Link to Analytics button.
    Instructions
  2. From the pop-up window, select your Google Analytics account and the view that you want to link with.
  3. From the pop-up window that appears, copy your Optimize container ID.
    Instructions

Set objectives

From the Measurement and Objectives section, click Add Experiment Objective. Choose your primary objective for the A/B test, for example a goal from Google Analytics.

Instructions

Add Optimize to Tag Manager

After you're done with the above settings, follow this guide to load Optimize from Tag Manager.

Verify installation

In the Optimize experience page, click the Run Diagnostics button from the Settings area to verify your setup.

Start experiment

Start the experiment by pressing the Start button.