Extract Google Optimize A/B test data

Learn how to configure a Google Optimize data link so you can use Analytics Toolkit's advanced AGILE engine to analyze tests delivered through Optimize. Analytics Toolkit will then automatically extract and analyze the data at intervals, and notify you if an action can be performed on your A/B test.

This article will help you
  • configure a Google Optimize data link for an A/B test
  • link your Google Analytics account, if necessary

IMPORTANT: Google Optimize © will sunset later in 2023 alongside Universal Analytics, and native support for it will no longer be offered. Please, consider using our Data API instead.

Google Optimize © offers a powerful platform for delivering A/B tests through a front-end JavaScript framework, as well as through back end integration. While it has certain drawbacks as an experiment delivery framework, its most perceivable issues are in terms of interpretation of the results and the statistical estimates presented, as argued on multiple occasions in our articles. By using Analytics Toolkit to analyze your Optimize-run experiments, you can achieve statistically robust A/B testing on a budget.

Basics of a Google Optimize integration

Since Optimize uses Google Analytics to store and analyze data, a Google Optimize data link is essentially equivalent to our Google Analytics data link, but some parameters are inferred from the Optimize experiment details instead of being specified by the end user.

It is therefore a requirement to link your Google Analytics through Account > Data Sources > Google Analytics. After successfully linking GA, you should also activate the relevant Analytics properties that would contain the A/B test data for use in Analytics Toolkit. This happens through the same screen.

With this, you are ready to create your first A/B test which will use Google Optimize as a delivery mechanism and Analytics Toolkit's statistical engine for data analysis.

Configure an Optimize data link

After creating a new A/B test, navigate to the screen for choosing the data source. Then, select Optimize from the list of options:

selecting Google Optimize as a data source
selecting Google Optimize as a data source

Clicking "Continue" will lead to a screen with data link details.

Identify the correct Google Analytics view

selecting the Google Analytics view
selecting the Google Analytics view

Begin by selecting the Google Analytics account, property, and view where the Optimize data is or will be stored. This is related to your choice of a Google Analytics view in Google Optimize itself. If unsure which view it is, open the A/B test in Optimize, click on Details, then scroll down to the "Measurement and objectives" section where the information is located:

identify the correct Google Analytics view
identify the correct Google Analytics view

Specify experiment data characteristics

The final step is let Analytics Toolkit identify your test data. In the simplest scenario, only a single selection should be made. After selecting the correct Google Analytics view, a list of experiments related to that view will appear in the "Optimize experiment" field with the same names as they appear in the Optimize interface. Select the appropriate one.

identify the test data
identify the test data

After that Analytics Toolkit will automatically extract the conversion metric chosen for that test in Google Optimize and preselect it for you. If you want to use a different metric in Analytics Toolkit, you can choose from the now-populated drop-down menu.

An additional setting to consider is the "Default control group is not used (control UX is the first variant)" checkbox. Flip it on if you are not using the default control group in Google Optimize ("Original") to prevent potential bias. If that is the case, you must use the first variant slot for the control, and subsequent variant slots for the test variants.

Finally, you can also specify a custom or default segment which would limit what test data is extracted. For example, you can use a segment for just mobile users, or you might have created a custom segment containing just mobile users from the USA. To specify the segment, simply navigate to a Google Analytics report where this segment (and only this segment) is applied, then copy it and paste in the "Custom segment" input field. The URL will be parsed immediately and the segment ID extracted for you.

The data extraction process

Once the configuration is saved, Analytics Toolkit will start extracting data from Google Analytics automatically. The extractions will be spaced in time so they follow the monitoring schedule specified during test creation. For example, with a seven day interval, the first data retrieval will be on day eight after the start date. This is to make sure all data for days one through seven has been processed by Google Analytics. The next analysis will follow in another seven days, and so on.

The data is analyzed statistically after each successful retrieval. If there is a crossing of the efficacy boundary the test is stopped and a email notification is sent to you. If there is a crossing of the futility boundary, an email notification is sent, but the test will only be stopped if it was designed with a binding futility boundary. Otherwise it will be put in "Pending action" status where it will await your decision. It can be made in the Analytics Toolkit test analysis interface. Note that data gathering will continue in this latter case.

In case a data retrieval issue is encountered, you will receive an email notification with details on what it is and suggestions on how to fix it. Common issues include having a wrong starting date (this can be edited from the actions drop-down > "Edit test info"), having selected the wrong Google Analytics view, selecting the wrong Optimize test, or a Google Analytics technical issue which causes data to not be gathered about the Optimize experiment.

Key tips
  • connect a Google Analytics account and activate properties for use in Analytics Toolkit before you can use the Google Optimize data link
  • make sure the start of the test in Analytics Toolkit coincides with the start date in Google Optimize
  • the traffic allocation should be equally split between all test variants and the control
What to watch out for
  • do not pause tests in Google Optimize
  • do not change the traffic allocation in Google Optimize after starting the test
  • do not pause test variants in Google Optimize
Google Optimize test data

Last updated:

See this in action

A/B Testing Hub