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:
- 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.
- Select “Target segments”:
- (Optional) Enter a name for the rule.
- In the Operator menu, select whether you want contexts in these segments or not in these segments to match the targeting rule.
- In the Segments menu, enter or select the segments you want to target.
- (Optional) Click the + to add additional clauses to your targeting rule.
- From the Select… menu, select either the variation to serve, a manual percentage rollout, a progressive rollout, or a guarded rollout.
- Click Review and save.
Here is an example of a targeting rule for segments:
Target from within a segment
You can also target a segment starting from the segment itself. Here’s how:
- Navigate to the segment you want to target.
- Click Target this segment. A “Target this segment with a flag rule” dialog appears.
- Select the flag where you want to use the segment.
- Click Target this segment.
You are taken to the flag’s targeting page to complete the segment targeting rule.