Create segments for Google Analytics 4 (GA4)
Use Google Analytics 4 (GA4) to capture and analyze traffic data across your websites and applications.
Note
This is a third-party integration and is not an Optimizely subprocessor. See Optimizely's Third-Party Add-Ons & Platform Integration Terms.
Prerequisites
Before creating segments within GA4, you must configure an integration between Optimizely Feature Experimentation and Google Analytics 4 (GA4). For information on configuring this integration, see Configure Google Analytics 4.
Note
It can take up to 48 hours before values become available in Google Analytics 4 (GA4) so that you can create dimensions and segments with them.
Create segments in GA4
Complete the following steps to create segments for Optimizely Feature Experimentation in GA4:
Create custom dimensions
-
Go to Configure > Custom definitions > Create custom dimensions.
-
Complete the following fields on the New custom dimension page:
a) Dimension name – Enter your desired name (such as Optimizely FS Flag).
b) Scope – Ensure this is set to Event.
c) Description – Enter an optional description.
d) Event parameter – Select Flag. -
Repeat steps one and two for Rule.
-
Repeat steps one and two again for Variation.
Create an exploration and add segments
-
Go to Explore and select an exploration type (for example, Free form).
-
In the Variables panel, click + for SEGMENTS.
-
On the Build new segment page, in the Create a custom segment section, click User segment.
-
Enter the name of the segment (specifying the specific flag, rule, or variation for which you are creating this segment).
-
Expand the Add new condition drop-down list and click Custom > Optimizely FS Flag.
-
Click ADD FILTER.
-
Ensure the Condition is set to contains and then select the flag, rule, or variation for which you want to create the segment. The following image shows an example for Optimizely FS Flag:
-
Click SAVE AND APPLY.
-
Repeat steps two through eight for Rule.
-
Repeat steps two through eight for Variation.
Updated 2 days ago