This article will help you:
  • Determine which visitors can be included in an experiment based on certain qualities about them
  • Create new audiences in Optimizely or add existing ones to your experiments
  • Build audiences using conditions or custom code

Audiences allows you to control which visitors can see your experiment, based on whether they match a list of conditions that you specify.

For example, you can include or exclude visitors who:

  • use certain browsers or devices
  • come from certain sources (like an AdWords campaign, a Google search, or a Facebook ad)
  • have certain cookies
  • visit your page with certain query parameters (like ?member=true)
  • visit from certain areas or speak certain languages
  • visit at certain times or days
  • meet virtually any condition that you set

Most default audience conditions aren't "sticky," meaning the condition is re-evaluated for the visitor on each new page-load. The exceptions to this rule are the Ad campaigns and New vs. Returning Visitor audience conditions. Visitors who don't meet the audience conditions that you set won't be eligible to be included in the experiment. Instead, they will see your original page and won't be included in the count of unique visitors on the Results page, since Optimizely only counts visitors who are in the experiment.

If you want your visitors to see just one of two or more experiments, meaning you want to exclude a visitor who is bucketed into one experiment from all other experiments, check out this article on simultaneous testing and mutually exclusive experiments.


Available audience conditions vary based on your Optimizely plan type. If what you see doesn’t match what’s in this article, or you want to learn more about what’s available, please refer to our feature pricing matrix.

Want to see Audiences in action? Check out this two minute video


We have a separate article with use cases and ideas for audiences, and more detail on each Audience condition that you can use in your experiments.


Audiences determine who can see the experiment. If you want to control where on your site the experiment will run, use URL targeting

You can see all audiences that you have created within a project by going to your Home page, then the OverallAudiences tab.

Here, you can see all audiences, as well as which ones are enabled for segmentation on the Results page.

Create Audiences

There are three ways to create a new audience. From the Overview > Audiences tab in the Home page, click the New Audience button (pictured above).

In the Overview > Experiments tab, click Edit next to Audiences in the right-sidebar.

Within the Editor, click the Audiences icon in the top-right.

Within an experiment, you'll have the option to Add a Saved Audience that you already created, or to Create a New Audience from scratch. You can also target multiple audiences within the same experiment. In that case, visitors will be added to the experiment if they're part of any audience that you've added.

To combine multiple audiences so that visitors will only be added to the experiment if they qualify for all of those audiences, create a new audience that combines all the conditions from each audience you want to include.

If you click Create a New Audience, you'll have the option to add a name and description for the audience. These should be easy for you to remember and reuse across experiments.

Enterprise customers have 10 slots that can be used to enable Results page segmentation for either audiences or dimensions, which means that you will be able to filter your experiment results specifically for those 10 groups of visitors. You can use any combination of audiences or dimensions to fill the 10 slots. To enable an audience for Results page segmentation, just enable it from the Create new audience menu.

Note that you will only be able to change an audience's conditions if it is not being used in another experiment. You should not change an audience while an experiment is running; if you have multiple experiments that use an audience and you want to change it, we recommend duplicating the audience instead.


When you’re creating an audience, be aware of its persistence or “stickiness.” Whether an audience is persistent depends on whether you’ve enabled segmentation for it.

By default, audiences are not persistent. This means that if you target an experiment to an audience, Optimizely will check the targeting conditions on every pageview and evaluate whether the visitor should be included. Visitors will be added if they meet the conditions and removed if they don't. For example, a visitor may meet the targeting conditions and be included in the experiment early on. If she returns later, maybe with a different browser or language setting that doesn't meet the experiment's audience conditions, she'll no longer be included in the experiment.

If you enable segmentation for an audience, then Optimizely's behavior changes, and the audience will be persistent. This means that if a visitor qualifies for a certain audience, she will continue to qualify for that audience every time she visits a page that the experiment runs on (or vice versa). This also means that if she visited multiple times, sometimes meeting the conditions and sometimes not, she will show up in both segments on the Results page.

Add Audience Conditions 


For customers who used our Visitor Condition Targeting feature in the past, this is now how you set visitor conditions.

You can define audiences using conditions that are specified within Optimizely. Just drag the condition from the right side of the Audience Conditions menu into the main area on the left. You may use combinations of "and" / "or" conditions to create your audience.


A "logged-in mobile visitors" audience may have two "AND" conditions: 

  • Platform / OS: Any mobile platform
  • AND
  • Cookie: loggedIn=true

Both must match for a visitor to be included in this audience.

A "French or Spanish visitors coming from Europe Vacation campaign" audience may have two "OR" conditions and one "AND" condition: 

  • Language: French
  • OR
  • Language: Spanish
  • AND
  • Query Parameter: utm_campaign=euroVacation14

Below, we'll describe the default audience conditions available in Optimizely. Each one links to a more detailed description in the Audience Conditions article.

Available on all plans:

  • Browser / VersionAdds visitors to your experiment based on a visitors browser/version. You can choose to include or exclude visitors who are using specific browsers or versions of a browsers.
  • New/Returning Session: Adds visitors to your experiment based on whether this is the first session in which they have been exposed to your Optimizely snippet. Visitors who return in a different session later will become "returning" visitors.
  • LanguageAdds visitors to your experiment based on the preferred language choice (ex. en-us) that they set in their browser. This in effect lets you target by country.
  • Query ParametersAdds visitors to your experiment based on whether they come to your page using a URL that contains a certain query parameter. Commonly used to target audiences based on SEM campaigns or other information passed through query parameters
  • Referrer URL: Adds visitors to your experiment based on the referrer website the visitor is coming from (ex. Google, Facebook, etc.)
  • DeviceAdds visitors to your experiment based on a visitors device type. Choose between iPhones, other mobile phones, iPads, other tablets, or desktop/tablets.
  • Platform / OSAdds visitors to your experiment based on the platform or operating system they are using. Choose between mobile and desktop platforms or specific opterating systems like Windows or OSX.

Available on Legacy (Bronze, Silver, Gold) and select Enterprise plans:

  • CookieAdds visitors to your experiment based on whether they have a certain cookie, or whether the cookie is set to a certain value. Leaving the value section blank will target any cookie value, and just look for the presence of the cookie. Commonly used to target audiences based on logged-in status or other information passed through cookies.
  • Custom Event: Adds visitors to your experiment based on whether the visitor has triggered a custom event goal in Optimizely.
  • Custom JavaScriptYou can write your own JavaScript condition that must be matched before an experiment is run. 
  • Custom Tags: Adds visitors to your experiment based on custom information you have about a page (ex. the page category) or a visitor (ex. their pricing plan)
  • Traffic SourceAdds visitors to your experiment based on the referrer (campaign, search, referral, or direct) described in our article on Dimensions. This feature may not be available on Bronze and Silver plans.

Available to select Enterprise plans:

  • Ad Campaign: Adds visitors to your experiment based on specific utm_campaign parameters, as described in our article on Dimensions.
  • IP AddressAdds visitors to your experiment based on their IP address range.
  • Location: Adds visitors to your experiment based on their city, country, state, or region. Also known as Geotargeting.
  • Time/Day of Visit: Adds visitors to your experiment based on a specific day/time frame when they visit.
  • Uploaded Audiences: Lets you upload lists of query parameters, cookies, or ZIP codes and target experiments to visitors who match them.
  • Custom Dimensions: Use one of your custom dimensions as an audience. Custom Dimensions are pieces of information that your code detects about each visitor, then tells Optimizely about via the JavaScript API. Each dimension can have have multiple values, such as Logged-In (with values True or False), or Elite-Status (None, Silver, Gold, 10k). They can be used for targeting audiences as well as segmenting results.
  • Third Party: Use audiences created from third-party integrations such as BlueKai, Demandbase, Skymosity, Lotame, Lytics, Tealium, or Woopra. You'll see these appear as drop-downs in the Conditions section.

Optimizely for iOS offers a different set of audience conditions.

  • App version: The version of your app, as defined by you.
  • Custom tag: Functions identically to custom tags in Web experiments. For more information on how to add custom tags to your code, see our developer resources.
  • Device model: The hardware on which the app is currently running (iPhone, iPod, iPad, iPhone/iPad Simulator).
  • Is an iPad / iPhone / retina device: Boolean value for if the current device is / is not an iPad, iPhone, Retina.
  • NSLocaleIdentifier: The locale is formed from the settings for the current user’s chosen system locale overlaid with any custom settings the user has specified in System Preferences.
  • Language: The language that the device is using within its System Preferences; this is also a subset of NSLocaleIdentifier.
  • SDK version: The version of Optimizely's SDK.
  • System version: The iOS version on the device currently running the app.

Edit Code Mode

You may want to create an Audience that uses more customized and/or logic than Optimizely's Audience UI can display. In this case, click Edit Code Mode to turn off the default Audience Condition UI and write your own JSON conditions. 

From here, you may write your own custom conditions. Optimizely will evaluate your code 100% for targeting and display an error if your code isn't correctly formed. However, if your code is too complex, Optimizely will not be able to display the targeting conditions visually in the Audience Condition UI.