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
Go to the Audiences page
Click New Audience
Give the audience a name
Add conditions
Add more conditions or groups
Save the audience
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.
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).