Targeting segments

Overview

This topic explains how to target a segment in a flag rule. If you have many flags that need to target the same group of users or other contexts, we recommend that you create a single segment for your flags to target. This lets you manage targeting for that group in one place instead of recreating identical rules in each flag.

Target segments

To target a segment within a flag rule:

  1. From the flag’s Targeting tab, click the + button between existing rules.
    • If the flag is off and the rules are hidden, click View targeting rules.
  2. Select “Target segments”:

The "+" menu, with targeting options.

The "+" menu, with targeting options.
  1. (Optional) Enter a name for the rule.
  2. In the Operator menu, select whether you want contexts in these segments or not in these segments to match the targeting rule.
  3. In the Segments menu, enter or select the segments you want to target.
  4. (Optional) Click the + to add additional clauses to your targeting rule.
  5. From the Select… menu, select either the variation to serve, a manual percentage rollout, a progressive rollout, or a guarded rollout.
  6. Click Review and save.

Here is an example of a targeting rule for segments:

A targeting rule for segments.

A targeting rule for segments.

Target from within a segment

You can also target a segment starting from the segment itself. Here’s how:

  1. Navigate to the segment you want to target.
  2. Click Target this segment. A “Target this segment with a flag rule” dialog appears.
  3. Select the flag where you want to use the segment.
  4. Click Target this segment.

You are taken to the flag’s targeting page to complete the segment targeting rule.