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.

The Audience Builder: take condition types from the right, drop them into groups on the left, and combine them with AND/OR logic.

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

Click Add condition group to create a group. Each group has its own AND/OR toggle, and you can put groups inside groups for deeper logic.

Putting conditions where you want them

There are two ways to place a condition, and you can mix them freely.

Drag it. Pick up a condition type from the sidebar and drop it straight into the group you want. Groups you can drop into are outlined while you drag, and the one under your cursor is highlighted, so you can see where the condition will land before you let go.

Click it. Clicking a condition type adds it to the main group. From there, grab the handle on the left of any row and drag it into a group, or reorder it within the group it is already in.

Whole groups move too. The handle in a group's header picks up the group and everything inside it. A group cannot be dropped into itself or into one of its own nested groups, so that branch greys out while you are dragging it.

To build the mobile AND (US OR CA) example:

  1. Click Device in the sidebar and set it to Mobile. It lands in the main group.
  2. Click Add condition group and set the new group to OR.
  3. Drag Location from the sidebar into that group. Do it a second time, then set one to United States and the other to Canada.

Nothing is committed until you press Save, and letting go outside a group cancels the move, leaving the builder exactly as it was.

Groups you leave empty are removed when you save, so an unfinished group never widens your audience beyond the people you described.

Not sure what a condition does?

Every condition type in the sidebar has a question mark next to it. Click it for a plain description of what that condition looks at, plus a short example. Press Escape or click anywhere else to close it.

Building without a mouse

The builder works from the keyboard alone.

  1. Tab to a condition type in the sidebar and press Enter or Space. It is added to the main group.
  2. Tab to that row's drag handle and press Space to pick it up.
  3. Use the up and down arrow keys to move it, including into and out of nested groups.
  4. Press Space to drop it, or Escape to cancel and leave everything where it was.

Each step is announced as you go, so you always know what you are holding and which group it is over. Group handles work the same way, moving the group and its contents together.

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

Drag a condition type from the sidebar on the right into the builder, or click it to add it to the main group: device, browser, platform, location, language, query parameter, visitor type, cookie, or custom JavaScript. Set its operator and value on the row.

5

Add more conditions or groups

Continue adding conditions. Switch a group between AND and OR with the toggle at the top of that group. For more complex logic, click Add condition group and drop conditions into it. Use the handle on any row to move it between groups later.

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.

It works the other way too. Custom Attribute is offered in Feature Flag projects only. It matches data your own code hands to an SDK, and the snippet on your website is never given any, so a rule of that kind never matches anyone on a website. Each project type is only offered the conditions it can actually act on.

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.

Deleting an audience

Delete an audience from its row menu on the Audiences page. The Linked to column shows the experiments and feature flag rules that use it.

A delete is refused while the audience is in use by something that serves visitors, or can start to:

  • a running or scheduled experiment
  • a feature flag rule that is running, ready to start, paused, or concluded

The delete dialog lists them before you confirm, each linked so you can open it, and for a flag rule it names the flag and the environment too. Take the audience off them, or stop or delete them, then delete the audience. The guard is there because an experiment or flag rule left with no audience matches every visitor.

An audience used only by paused, draft, or finished experiments, or by draft flag rules, deletes straight away and is removed from them. The dialog names those draft rules too, because a rule left with no audience serves every visitor once it runs.

Next steps

Was this helpful?