---
title: Create segments in Google Analytics 4
slug: web-experimentation/docs/create-segments-in-ga4
docTags: 
createdAt: 2026-07-23T11:40:26.461Z
---

:::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/).
:::

You must integrate [Optimizely Web Experimentation with Google Analytics 4 (GA4)](docId\:MgDO4W849hlaxfMy4GnWn) to create segments for Web Experimentation within GA4.

If you use the [GA4 Report Generation feature](docId\:aboSXIz13IEnvRbNKnuX9), you do not need to create segments manually. Instead, you can use the Audiences created automatically with the GA4 integration.

:::hint{type="info"}
**📘 Note**
It can take up to 48 hours before values become available in Google Analytics 4 (GA4) so that you can create dimensions or segments with them.
:::

## Create an exploration and add segments

1. Go to **Explore** and select an exploration type (for example, **Free form**).

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

2. Go to **Variables** and click the **Add** icon next to **Segments**.
3. Go to **Create New Segment > User Segment**

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/aTfBly3FtIejY79yTnFuE_4c0f0f9-create-segments-ga4-step-23.png)

4. Enter the name of the segment (specifying the specific experiment/variant for which you are creating this segment).
5. Click **Add new condition** and enter **experience\_impression**.
6. Click **Add parameter**.

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

7. Create a custom definition for **exp\_variant\_string** and click **Save**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/H5LXM7bZHuX1w1nnJGen-_7be780287694aa74ec83c2e951a0a13c20d1c48a8ef0a1aa66ea517334da7455-exp-variant-string.png)

8. Set the conditions as **Contains** with the [variant ID](docId\:uu6zmA5Bkeqsq84hqUmL3).
9. Click **Apply**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Ti7NpWk5kAVtyLkH1ixoZ_f4d5177e8928d78c02dbad196b908aba806599bd34b13401c160f1877ebd2b7f-first-condition.png)

10. Click **And**.
11. Click **Add new condition** and enter **experience\_impression**.
12. Click **Add parameter**.
13. Create a definition for **Holdback**.

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

14. Click **Save**.
15. Set the condition to **does not exactly match** and **true**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/dEUGaIcXwfymqDzvZ0MzA_954267c901d06655810f50e714b94882304893149248ce5f6006ee2dda3d87e1-does-not-exactly-match.png)

16. Click **Apply**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/uil09TsiyyDOoJszihD-o_aba97f0995b35e77ac0b4789a27ce9390d5f71050bb3e963d65de80e6af15244-ga4-segments.png)

17. Click **Apply** to save the user segment.
