/Docs

Audience Builder

The Audience Builder lets you create reusable audience segments that define who should be included in or excluded from an experiment or feature flag rule. An audience is a collection of conditions — device type, country, browser, visitor type, custom data — combined with AND/OR logic. Once you create an audience, you can attach it to any experiment in your project.

What is an audience?

An audience is a saved set of rules that describes a group of visitors. For example:

  • Visitors on mobile devices in the United States
  • New visitors coming from paid search
  • Returning visitors using Chrome on desktop
  • Visitors whose subscription tier is "premium"

Audiences are defined at the project level and reused across experiments, just like metrics. You build an audience once and attach it to as many experiments as you need.

AND and OR logic

Conditions within a single audience are combined with AND logic by default. This means a visitor must satisfy every condition to match the audience. For example, if your audience requires device = Mobile AND country = United States, only mobile visitors from the US will match.

You can switch any group of conditions to OR logic, meaning a visitor matches if they satisfy any one of those conditions. For example, country = United States OR country = Canada would match visitors from either country.

Nested condition groups

For more complex logic, you can create nested condition groups. A group is a set of conditions that is evaluated together before being combined with the outer conditions.

For example, you might want to target: visitors who are on mobile AND (from the US OR from Canada). Without nesting, you would need two separate audiences. With a nested group, you can express this as:

  • Device = Mobile (AND)
  • Group (OR):
    • Country = United States
    • Country = Canada

Add a group by clicking Add group inside the audience builder. Each group has its own AND/OR toggle.

How to create an audience

1

Go to the Audiences page

From your project dashboard, click Audiences in the left navigation. This page lists all audiences created for the project.
2

Click New Audience

Click the New audience button. The audience creation panel opens with an empty condition builder.
3

Give the audience a name

Enter a descriptive name that makes the audience's purpose clear, such as Mobile US Visitors, New Paid Search Visitors, or Premium Subscribers.
4

Add conditions

Click Add conditionto add your first condition. Choose a condition type from the dropdown — device, browser, country, language, traffic source, visitor type, custom segment, cookie, data layer, or custom JavaScript. Configure the condition's value and operator.
5

Add more conditions or groups

Continue adding conditions. Toggle between AND and OR logic using the operator selector between conditions. Add nested groups with the Add group button for more complex logic.
6

Save the audience

Click Save. The audience is now available to select in the experiment builder.

Audiences in Feature Flag projects

Feature Flag projects use the same audience builder, but the available condition types differ from Web Experimentation projects. The sidebar groups conditions into two sections:

  • Attributes — Target users by auto-detected properties (browser, device, country) or custom attributes you pass to the SDK (userId, plan, team). This is the primary targeting mechanism for feature flags.
  • Browser Conditions — Device, browser, platform, and language detection. These work in client-side SDKs only.

Web-only conditions like Cookie, Custom JavaScript, Query Parameters, Location, and New/Returning are not available in Feature Flag projects because they depend on browser APIs that do not exist in server-side SDK environments.

Custom Attribute condition
The Custom Attribute condition is the main way to target users in feature flag projects. It lets you select from registered attributes (both auto-detected and custom), choose a type-appropriate operator, and enter a comparison value. Register attributes in Audiences > Attributes to make them available in the audience builder.

Using audiences in experiments

When building an experiment, Step 1 (Targeting) includes an audience selector. Click Add audience and choose from the list of saved audiences for your project. You can add multiple audiences to a single experiment.

Multiple audiences use OR logic

When you attach more than one audience to an experiment, they are combined with OR logic. A visitor is enrolled if they match ANY of the attached audiences. This is different from the AND logic used between conditions within a single audience.

For example, if your experiment has two audiences — "Mobile Visitors" and "Premium Subscribers" — any visitor who is on mobile OR is a premium subscriber will be enrolled. A visitor who is both mobile and premium subscriber also qualifies (OR is inclusive).

Everyone is the default
When you don't attach any audience to an experiment or flag rule, the audience picker shows an Everyone tag and the experiment runs for every visitor who matches the URL rules. Adding audiences narrows the pool — only visitors matching at least one audience are eligible, and the Everyone tag disappears.
Tip
Start with broad audiences and narrow them down as you learn more about your traffic. Running an experiment on all visitors first is a great way to gather enough data before splitting into segments.