---
title: Integrate Google Analytics 4 audiences
slug: web-experimentation/docs/integrate-ga4-audiences
docTags: 
createdAt: 2026-07-23T11:40:24.851Z
---

:::hint{type="info"}
This is a third-party integration and is not an Optimizely subprocessor. See Optimizely's [Third-Party Add-Ons & Platform Integration Terms](https://www.optimizely.com/legal/third-party-add-ons-platform-integration-terms/).
:::

[Watch the video](https://www.loom.com/share/ba1e124a8fec4fa1a0ecbd23372afec8?sid=2105fe72-eff8-45c5-9d9b-21175b6ec101) or [use the interactive demo](https://optimizely.navattic.com/x91j01bm) to learn about this feature.

## Prerequisites

- An Optimizely Web Experimentation account.
- An existing Google Analytics 4 property.

## Connect GA4 with Optimizely Web Experimentation

1. Go to **Settings** > **Integrations** > **Google Analytics 4 Audience Targeting**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/FL2lG3bT1T_aKsl233dWo_a9762d9-image.png)

2. Toggle the integration status to **On** and click **Accept** on the Add-On Platform Terms of Service page.
3. Click **Sign in with Google** and enter the required information to connect Optimizely Web Experimentation with your Google account.
4. If prompted, select all options to grant Optimizely access your Google Account. Click **Allow**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/-wPwQNsTpmw7t1xYETFuq_0741bf5-image.png)

5. Click **Edit** next to Settings. Enter your 9-digit **Google Analytics Property ID**. See [Google's documentation](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id#google_analytics) for help locating your property ID.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/DHlMtgWsVx0qXYWDiD14y_9f656fa-screenshot-2024-07-03-at-24455-pm.png)

6. Select your **Google Analytics ID Type**, which retrieves the [User ID](https://support.google.com/analytics/answer/9213390) or[ Device ID](https://support.google.com/analytics/answer/9356035) stored in GA4. This is dependent on your GA4 configuration:
   - If you do not bring your own identifiers to GA4, choose **Device ID**, the default option. The integration automatically retrieves the `_ga` cookie ID. You do not need to add any custom code for this ID type.
   - If you bring your own identifiers to GA4, choose **User ID** and input your **Google Analytics User ID** in the field. The Google Analytics User ID is a function name, such as `user_id`, that retrieves your GA User ID. You must add custom code directly on your page or in Project JS.
7. Click **Save**.

## Target experiments using GA4 audiences

After [connecting GA4 to Optimizely](docId\:ZEdV7AKHOKwSBGN9hJIgr) you can target experiments using GA4 audiences:

1. Go to **Audiences** > **Create New Audience**.
2. Enter the audience **Name**.
3. Expand **Google Analytics 4**.
4. Drag and drop your GA4 audience to the **Audience Conditions** section.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/sP0IMXX1cz7cGa1qdnnuN_38d2901-image.png)

5. Configure the audience as desired using the drop-down list.
6. Click **Save Audience**.

See [Target audiences using the Audience Builder](docId\:tSoFLwt3tc93lZ30vPaLd) for information on configuring audiences.

## GA4 audience limitations

The Google Analytics 4 (GA4) Audience Export API enforces privacy thresholds that restrict certain audience exports. Audiences using Age, Gender, or Interests dimensions are ineligible for export. This is a GA4 limitation, not an Optimizely issue.

If your GA4 audience uses any restricted dimensions, Optimizely cannot sync that audience, and *No visitors are bucketed into experiments targeting that audience.*

### Restricted and supported dimensions

The following table shows which dimension types GA4 supports for audience export:

| Dimension type                   | Eligible for audience export | Notes                                                     |
| -------------------------------- | ---------------------------- | --------------------------------------------------------- |
| Events (for example, `purchase`) | Yes                          | Behavioral data is supported.                             |
| Page views                       | Yes                          | Content-based dimensions are supported.                   |
| User ID                          | Yes                          | Supported when not combined with restricted demographics. |
| Age                              | No                           | Classified as potentially thresholded by Google.          |
| Gender                           | No                           | Classified as potentially thresholded by Google.          |
| Interests                        | No                           | Classified as potentially thresholded by Google.          |

To resolve restricted audience dimensions, remove any Age, Gender, or Interests filters from your audience definition in GA4. Use behavioral or event-based dimensions instead.

For information, see Google's [Data API limits and quotas](https://developers.google.com/analytics/devguides/reporting/data/v1/quotas).

## Timing Considerations

Consider the following with this integration:

- GA4 has a data processing delay of up to 48 hours from the time the data was collected. **It can take up to two days for a new user to be registered as part of an audience in GA4.**
- The list of active users in a GA4 audience is updated by Optimizely daily. **It can take up to one day for new users to be qualified in an experiment when targeting a GA4 audience.**
