The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsProduct feedbackGitHubNuGetDev CommunitySubmit a ticketLog In

Integrate Google Analytics 4 audiences

How to import your Google Analytics 4 (GA4) audiences to Optimizely Web Experimentation.

📘

Note

See Optimizely's Third-Party Add-Ons & Platform Integration Terms.

👍

Beta

Integrating Google Analytics 4 (GA4) audiences is currently in beta. Contact your Customer Success Manager or sign up for the beta on Optimizely.com.

You can use your Google Analytics 4 (GA4) audiences to act on insights gathered from experiment results with your GA4 integration. This lets you target experiments based on segments in GA4 without the need for custom development.

Using GA4 audiences unlocks new targeting capabilities within Web Experimentation. For example, GA4 has demographics-based audience creation (age and gender) and predictive audience identification for potential purchases within a specified timeframe. Watch the video or use the interactive demo 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.

  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.

  5. Click Edit next to Settings. Enter your 9-digit Google Analytics Property ID. See Google's documentation for help locating your property ID.

  1. Select your Google Analytics ID Type, which retrieves the User ID or Device ID 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.
  2. Click Save.

Target experiments using GA4 audiences

After connecting GA4 to Optimizely Web Experimentation 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.

  5. Configure the audience as desired using the drop-down list.

  6. Click Save Audience.

See the end-user documentation on Target audiences using the Audience Builder for information on configuring audiences.

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.