Audiences give you control over which users are included in a rollout and have access to your feature.
You'll describe which users to include based on custom attributes like their location, device type, or subscription plan. After you create an audience, you can add it to your feature.
A single audience is defined based on user attributes. These attributes are properties of a user that you pass in when calling APIs like
Is Feature Enabled. When you pass attribute values, Optimizely uses them to determine whether the user qualifies for rollout.
After you've created a few attributes, you can start building audiences. Audiences help you target your feature to certain groups of users. You can reuse audiences that you've created across multiple features.
Rollouts supports several match types that you can use in audience conditions:
has any value
String contains substring
Boolean is false
Boolean is true
Number is less than
Number is greater than
The Edit Audience window lets you define audience conditions by either dragging and dropping attributes from the right side pane or defining complex JSON objects using the Code Mode window.
To drag and drop attributes:
- Navigate to Audiences > Saved.
- Click Create New Audience.
- Drag and drop the desired attributes into the Audience Conditions field.
For example, to create an audience of visitors who are located in the US, based on specific location values, add the "LOCATION" attribute.
- Define the attributes.
Add other attributes to help create your audience. They can be can be added as "and" or "or" conditions. When you choose any match type option other than String equals for exact matching, a message displays that the option requires using an SDK version of 3.0, at minimum.
- Click Save Audience.
To use Code Mode to create a custom JSON object:
- Create a new audience or select an existing audience to edit. The Edit Audience window appears.
- Click Code Mode to access the Edit Code Mode window.
- Create the necessary JSON object for your use case. For more information, see Audience Conditions.
- Clear the Code Mode checkbox to exit the editing mode.
Updated 7 months ago