Segments & Targeting
Segments allow you to create reusable groups of users based on their attributes, making it easy to target specific audiences for feature rollouts and experiments.
How Segments Work
Think of segments as dynamic filters on your user base.
- Master User List: Your application maintains user data and traits (attributes).
- Dynamic Filtering: You define a segment by creating rules that filter this list (e.g.,
Country = USANDPlan = Premium). - Manual Management: You can also manually add specific users to a segment (e.g., adding a specific
User IDto a "Beta Testers" segment).
Once created, a segment becomes a reusable target. Instead of redefining "US Premium Users" for every single feature flag, you define it once as a Segment and simply select it when configuring your flags.
What are Segments?
Segments are groups of users defined by shared attributes or conditions. You can create segments based on:
- User attributes: Plan type, account age, job title
- Custom traits: Tags, preferences, behavior
- Manual Inclusion: Specific list of User IDs
Note: While you can target features based on runtime context (like Country, Browser, or Device Type), Segments are typically used for more stable user attributes that define membership (like "Premium Plan" or "Beta Testers").
Creating Segments
- Navigate to Segments in the Toggly dashboard
- Click Create Segment
- Define segment conditions using attributes and operators
- Give the segment a name and description
- Click Create