Link GA4 with Google Optimize

Link Google Optimize with Google Analytics 4 (GA4)

With the latest update, Google announced a new possibility to link Google Optimize with Google Analytics 4. But can it be used for data analysis inside GA4, and what you should keep in mind? Let’s find out.

How to link GA4 to Google Optimize?

First of all, let’s take a look at the full linking process between Optimize and GA4.

If you haven’t linked any GA properties to Optimize yet

When you are creating a new experiment in Google Optimize you will be offered to link Experiment to Google Analytics property.

Now, if you have Publish access in Optimize and at least Edit access in GA4, then you should see new properties available for selection.

When you select a GA4 property you will be offered to pick a data stream that you want to connect.

After you link the property you will see the following view, and you can now add the experiment objective.

When you pick experiment goals, you will notice straight away that the list of possibilities is very poor at the moment. You also can’t use custom events as your objective, which makes analysis of tests useless in many scenarios.

You have an option to select Purchase / Revenue and Pageviews as your objectives.

If you already have connected Universal Analytics in Optimize

If have linked Optimize to GA before, you can switch to a GA4 property by clickin on “Settings” link on the main Experiences page.

Edit measurement settigs by clicking on a pencil icon.

Pick GA4 propery, save changes.

How to find Google Optimize data in GA4

When you start the experiment that was linked to GA4 you will find a new event “experiment_impression” under the “Engagement > Events” section.

experiment_impression event in GA4

If you click on it, you should be able to see additional parameters that are passed with this event in real-time. You will find 2 additional parameters:

  • experiment_id
  • variant_id
experiment_id parameter in GA4
variant_id parameter in GA4

The experiment ID will be the same as shown in the Measurement configuration, so if you are running multiple tests at the same time you can distinguish between them in Google Analytics using this value. And variant is basically just a number attached to Experiment ID.

0 means Control group and 1,2, etc will be your test variations.

Can I view my experiment performance in GA reports?

As usual, to view any historical data for any event parameters we would need to create a custom Exploration report. But wait…. There is a catch – you can’t actually pick Variation or Experiment ID in your reports yet until you haven’t registered those as custom dimensions. And the same applies if you want to create segments:

Register variant_id in GA4

Well, it’s unclear to me how you can call this a “Linking” between Optimize and GA4, and why would you not create experiment-related parameters automatically, but oh well, we work with what we have.

So, after adding a custom dimension “variant_id” you could actually create a report based on that dimension and view data for each variation:

Optimize experiment report example in GA4

Notice that we have only data available about Users, no sessions or session related events.

You could also use that information in a custom segment by right-clicking on table row:

But at the moment that would give us completely false results:

As per Google, you can’t properly view experiment results in GA4 interface yet, so we have to wait until that’s fully available to be able to explore reports.

Why you should avoid using GA4 link in Optimize?

Here are my highly opiniated thoughts on why you shouldn’t link Optimize with GA4 at this stage, and why Universal Analytics is still a better option.

  • It’s in Beta-test. Things will not work as expected, and if you want to have usable data in GA to segment users who have seen experiment – better use Universal Analytics
  • Very limited set of Experiment objectives. You can pick only conversions, revenue and pageviews at the moment, as opposed to Universal Analytics link where you can add custom objectives based on any events.
  • Reporting and segmentation of experiments in GA4 interface is not fully implemented yet.

What are the benefits of linking Optimize to GA4?

  • Audience targeting – One considerable advandage of GA4 linking with Optimize is availability of GA Audiences for experiment targeting. It means that you can create an audience in GA4 based on any set of actions and then target those people in your experiment. Previously if was available only to Optimize 360 customers.
Audience and Google Ads targeting in Google Optimize.


Integration possibilities of GA4 with Google Optimzie are obviously in it’s infancy at this stage. There are basically no customization options if you want to add non-Transactional goals for your experiment (as we currently can do using Universal Analytics) and reporting is lacking a few features. You can check a full list of comparisons between GA4 and Universal Analytics in Optimize in the official documentation.

If you want to analyze your A/B test performance in Google Analytics, I would still recommend using Universal Analytics. If you are more interested in targeting Google Ads visitors with more personalized Experiences and A/B tests or you want to use GA audiences for targeting – you might consider trying out this new feature. A usable version of GA4 link will hopefully come in later releases.

One thought on “Link Google Optimize with Google Analytics 4 (GA4)

  1. Hi there,

    I can’t seem to change the data stream of my google analytics account. I would like to change it to our web stream, but I’m not able.

Leave a Reply

Your email address will not be published. Required fields are marked *