Current Page

Current Page

Feb 8, 2024

Integrate A/B testing results into Google Analytics 4

Instructions to tracking experiments with Google Analytics 4

Optimal UX provides robust analytics with Machine Learning and insights extraction. However, you can still use Google Analytics 4 to compare the behavior of your experiment participants.

Below is the short video about how to set up an audience for your experiment:

Enable integration with GA4

  1. Go to your website settings by clicking the gear icon in the top right corner:

2. Select “Integrations” in the left-side menu:

3. Turn on “Google Analytics 4”

4. Now your experiment data will be also sent to Google Analytics 4 if it is enabled on a web page.

5. (Optional) For your convenience Optimal UX can automatically create audiences whenever a new experiment is launched. Click “Authorize” and follow instructions to connect your site to Google Analytics property.

It is recommended to configure automatic audience creation.

Configuring experiment audiences

To distinguish between experiment variants in Google Analytics 4 you need to create audiences there - one per each variant.  Every time you launch an experiment, the system will generate unique identifier for each variant that needs to be copied into Google Analytics.

  1. Click “Configure GA4” on the Analytics page

  2. Copy the ID code of your first Variant. You will need this code later.‍

Well done! Now proceed to your Google Analytics account.

Set up Google Analytics 4 to track your experiments

  1. Log into your Google Analytics account. Note: You need to have Admin access to the account.

  2. Hover over the left sidebar and click on the “Admin” section in the bottom left corner.

  3. Scroll down to the “Data Display” section and click on “Audiences”

  4. Click on “New audience” in the top right corner. Note: You have to create a unique audience for each variant in your experiment.

  5. Select “Create a custom audience”

  6. Give your audience a meaningful name, e.g. “Experiment name — Variant letter”

  7. Click on “Add new condition” and select “General”, and then “Experience - variant ID”

  8. Click on “Add filter”, select “exactly matches (=)” and enter the Variant ID you have copied from OptimalUX app.

  9. Click “Save” in the upper right corner:

That’s it! Remember, you have to create a unique audience for each variant in your experiment.

View your experiments in Google Analytics 4!

200k free users on the house!

Jumpstart your A/B testing with 200k free users

We don't like giant flat rates! So we're giving you 200k free users each month. After that, only $1 for every 1000 unique visitors who participated in an A/B testing.

Stacey O.

Alex V.

Thomas P.

* Introductory pricing for the next 100 customers only!

200k free users on the house!

Jumpstart your
A/B testing with 200k free users

We don't like giant flat rates! So we're giving you 200k free users each month. After that, only $1 for every 1000 unique visitors who participated in an A/B testing.

* Introductory pricing for the next 100 customers only!

200k free users on the house!

Jumpstart your A/B testing with 200k free users

We don't like giant flat rates! So we're giving you 200k free users each month. After that, only $1 for every 1000 unique visitors who participated in an A/B testing.

Stacey O.

Alex V.

Thomas P.

* Introductory pricing for the next 100 customers only!

200k free users on the house!

Jumpstart your A/B testing with 200k free users

We don't like giant flat rates! So we're giving you 200k free users each month. After that, only $1 for every 1000 unique visitors who participated in an A/B testing.

Stacey O.

Alex V.

Thomas P.

* Introductory pricing for the next 100 customers only!