Skip to main content

Segments

What is a Segment

A segment is a group of users that share certain characteristics. In the context of feature flags, a segment can be used to determine which group of users should have access to a particular feature or version of a feature.

Segment Rules

Segments are created by defining a set of rules that use an attribute, an operation, and a value.

These rules are used to determine which users belong to a particular segment.

For example, let's say you have a rule that says:

"Users whose 'location' attribute starts with 'US' belong to the segment 'US users'."

In this example, the attribute is "location", the operation is "starts with" and the value is "US". If a user's location attribute is "US-New York", they would be considered part of the 'US users' segment.

String Rules

String rules are rules where the attribute is a string. The available operations for string rules are:

  • Equals
  • Not equals
  • Contains
  • Is contained in
  • Starts with
  • Ends with

The "Is contained in" rule is a filter that lets you segment data based on any of the values listed in a comma-separated format.

Number rules

Number rules are rules where the attribute is a number. The available operations for number rules are:

  • (less than) <
  • (Less or equal than) <=
  • (Equal) =
  • (Not equal) !=
  • (Greater or equal than) >=
  • (Greater than) >