Flaggy
Get started
← Features
SEGMENTS

Define your audience once. Target it everywhere.

Segments are reusable groups of users defined by attribute conditions. Create "enterprise plan" or "internal team" once — then reference them in any flag's targeting rules.

Example segments

Internal team

email ends_with: @flaggy.io

Enterprise plan

plan equals: enterprise

US users

country equals: US

Gmail users

email ends_with: @gmail.com

iOS users

platform equals: ios

Beta opt-in

betaOptIn equals: true

How segments work

Attribute-based rules

Define membership by any attribute you pass in the evaluation context — country, plan, email, custom properties. Six string operators are available: equals, not_equals, contains, not_contains, starts_with, ends_with. All values are compared as strings.

AND-combined conditions

Every condition in a segment must match (AND logic). Need an either/or? Define two segments — they evaluate in priority order, and the first whose conditions match wins.

Reusable across flags

Create a segment once and reference it in as many flag targeting rules as you want. Update the segment definition and all flags using it update automatically.

Evaluated client-side

The SDK downloads your segment definitions along with flag rules. Segment membership is checked locally — no round-trip required at evaluation time.

Combine with rollout percentage

Target a segment and add a percentage rollout on top. For example: "10% of EU users" — the SDK handles consistent assignment within the segment.

Segment limits by plan

Plan Segments Rules per segment
Free2Unlimited
TeamUnlimitedUnlimited

Start targeting the right users

Free plan available. No credit card required.