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 TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

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.

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 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.