Segment targeting
Read time: 2 minutes
Last edited: Oct 02, 2024
Overview
This topic explains how to control which segments receive a variation of a feature flag.
Target segments
Segments are lists of contexts that you can use to manage flag targeting behavior in bulk. You can target segments to release features to groups of contexts or end users at once.
We recommend using a segment when you want to target the same group of contexts using multiple flags. You can target the segment in each flag, rather than recreating a targeting rule or set of rules for many flags.
To target segments:
- From the flag's targeting page, click the + Add rule button, or + between existing rules, and 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.
- In the Rollout field, select the variation to serve, or set a percentage rollout.
- (Optional) Click + Add rollout to create a progressive rollout or guarded rollout for this rule.
- Click Review and save.
Here is an example of a targeting rule for segments:
To reference this rule when working with other members of your organization, click the link icon to copy a link to this rule.
To learn more, read Segments.