Create segments for experiment variants

Google Optimize and Content Experiments populate three experiment dimensions in Google Analytics which can be used in segments:

  1. Experiment Name
  2. Experiment ID
  3. Experiment ID with Variant

The Variant dimension will be deprecated shortly.

While the primary focus of an experiment is to find the variant that gives you the specific improvement you want (e.g., more goal conversions, lower bounce rate, etc.) you can also examine how behavior differs between variants and learn about their individual advantages and disadvantages in the process. For example, while the focus of an experiment might be on increasing conversions for a specific goal, you might discover that users in another variant spend more money overall.

Experiment dimension scope

Experiment dimensions are session-scoped. However – unlike most session-scoped dimensions – if a user is included in multiple experiments in the same session, the experiment dimensions will have multiple values that don’t overwrite the others. The experiment dimension values will be set on all experiment sessions.

Use segments to analyze experiment data

Some ways to use experiment data in segments include:

  1. Use Experiment ID to create a segment that includes everyone in your experiment.
  2. Use Experiment ID with Variant to create a segment that includes everyone in a specific variant.

To build a segment that includes everyone in a specific variant, use a condition-based segment filtered by Experiment ID with Variant:

  1. Sign in to Google Analytics.
  2. Navigate to your view and reports, or create a new custom report.
  3. Click + Add Segment.
  4. Click + NEW SEGMENT.
  5. Click Advanced > Conditions.
  6. Click on the search box and search for "exp". Optimize experiment dimensions in the Analytics Segment builder.
  7. Select Experiment ID with Variant.
  8. Select the exactly matches match type.
  9. Enter the Experiment ID with Variant.
  10. Complete your segment configuration.
  11. Click Save. Using the

To build a segment that includes everyone in a specific experiment use a condition-based segment, filtered by Experiment ID, that exactly matches your experiment ID, e.g. IzxbYxEfTeuq3bQqIAHB9g.

Using what you learned above you can also create Analytics segments that includes multiple experiments or variants by using the "OR" operator and adding more filters to your condition.

As with all Analytics segments, if you include Users instead of Sessions, all sessions for the user in the date range will be returned as long as one session was part of the desired experiment.

Related resources

Was this helpful?
How can we improve it?