Skip to main content


Optimizely Knowledge Base

Set up audiences in Optimizely: Audience Builder

  • Optimizely Web Experimentation
  • Optimizely Performance Edge
  • 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 with the Audience Builder
  • Build audiences using conditions or custom code

  • Audiences in a nutshell

    Audiences help you show your experiment to a specific group of visitors, based on conditions that you specify. For example, you might want your experiment to target visitors who've seen a specific AdWords campaign. Or you might show an experiment to visitors on mobile devices only. 

    Key tips 

  • Create audiences based on contextual, demographic, and behavioral conditions

  • Use segmentation to filter and analyze the behavior of one audience among multiple

  • Use mutually exclusive experiments to isolate visitors to one of multiple tests

What to watch out for

  • Most audience conditions aren't "sticky," except Ad Campaign and New vs. Returning Visitor. Visitors are re-evaluated for that condition every time they return to the page.

  • A single experiment can have multiple audiences, but be careful. If a visitors meets the criteria for any audiences in an experiment, they can be included in it.

  • If you want to add multiple audiences, use an "OR" condition. Using an "AND" condition will result in creating one audience with more than one criteria.

In Optimizely, an audience is a group of visitors that you define based on a set of shared traits -- which are called audience conditions. For example, you might group all visitors who've seen a certain ad campaign into an audience. Or, you might group visitors in a certain geographical region into an audience.

If you're using Optimizely Performance Edge, certain features described in is article will not be available to you. Optimizely Performance Edge is a lightweight experimentation product that delivers significantly faster performance than previous versions of Optimizely. It does this by relying on a streamlined "microsnippet" which limits the range of available features.

You'll see this notation edge-info.jpg whenever the text describes a feature that is available in Performance Edge.

You'll use audiences to control which visitors are eligible to enter an experiment and which are excluded. When you create an experiment or personalization campaign, you can target it to one or multiple audiences using AND and OR conditions.

Imagine that you're experimenting with a new video banner on the homepage of your site. You decide to exclude visitors on mobile devices from the experiment and include all new visitors and visitors who are in North America. If you have these audiences already, simply add them all to the experiment and specify how they'll be included or excluded -- instead of creating a new audience that specifically targets these conditions.

Watch the video below for a quick walkthrough of audiences and the Audience Builder. Scroll down for step-by-step instructions. 


Create an audience with the Audience Builder edge-info.jpg

Choose the Audiences dashboard. If any audiences have already been created, you will see them listed:


However, if you have not created a new audience before, your Audiences dashboard will look like this:


Click Add an Audience. Optimizely will take you to the Create New Audience modal window. This is where you'll define the conditions you want your visitors to meet to become part of the audience.

But first, name your new audience:


Add conditions edge-info.jpg

Next, you'll choose the conditions you want to use to define your audience.  Under Conditions, select Standard to reveal a list of commonly-used condition categories.


You have a wide range of built-in criteria to work with. You can easily limit the audience for your experiment to visitors who use a specific browser, live in specific areas, or speak only certain languages, for example.

Imagine that you want to create an experiment that will only be visible to visitors who are located in certain cities. To do this, drag Location from Conditions to Audience Conditions, on the left.


Type in the name of the first location on your list. Locations can be countries, provinces, states or cities. You can add as many as you need.

You can also exclude specific areas from an audience. Simply select "is not in" from the Visitor drop-down list, and add locations as shown above.


AND and OR conditions edge-info.jpg

You can always add more conditions to your audience requirements. Optimizely provides two areas for you to add more conditions, depending on whether they are 'or' or 'and' conditions.


What's the difference? Any new conditions you add to the 'or' conditions box will expand your audience (to include any visitor who meets your first set of conditions or your second set), while conditions added to the 'and' conditions box will shrink your audience (by requiring audience members to meet both your first and second set of conditions).

For example, if you wanted to limit your audience to visitors who both live in the United States and is a returning visitor, you would add New/Returining Session to the 'and' conditions box:


Under these conditions, only returning visitors who live in the United States will be bucketed into your experiment.

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

Standard conditions 

Optimizely's list of built-in standard audience conditions make it straightforward to create highly-specific, well-targeted audiences quickly:

  • Ad Campaign: Adds visitors to your experiment based on specific utm_campaign parameters, as described in our article on Dimensions.

  • Browser / Version edge-info.jpgAdds 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.

  • Cookie edge-info.jpgAdds 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 JavaScriptYou can write your own JavaScript condition that must be matched before an experiment is run. 

  • Device edge-info.jpgAdds visitors to your experiment based on a visitors device type. Choose between iPhones, other mobile phones, iPads, other tablets, or desktop/laptops.

  • IP AddressAdds visitors to your experiment based on their IP address range.

  • 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.

  • List attributes: Lets you upload lists of query parameters, cookies, or ZIP codes and target experiments to visitors who match them.

  • Location: Adds visitors to your experiment based on their city, country, state, or region. Also known as Geotargeting.

  • 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.

  • Platform / OS edge-info.jpgAdds 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.

  • Query Parameters edge-info.jpgAdds 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 URLAdds visitors to your experiment based on the referrer website the visitor is coming from (ex. Google, Facebook, etc.)

  • Time/Day of Visit: Adds visitors to your experiment based on a specific day/time frame when they visit.

  • 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 certain Optimizely packages.

You can also create your own audience conditions in JSON. See the Code Mode section below for more information on how to do that.

Learn more about audience conditions.

Custom attributes 

You can also use custom attributes to describe key characteristics of your visitors, such as plan type, and use them to create audiences. 

Custom attributes are pieces of information about each visitor that your code detects and describes to Optimizely 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.

Visitor behaviors 

In addition to the standard conditions and custom dimensions, you can also define your audiences based on how visitors have interacted with your website in the past. For example, suppose you want to limit the audience to US visitors who have purchased in the last 30 days. To do that, click Visitor Behaviors under Conditions, and then drag Add to Cart into the 'and' conditions box:


Visitor behaviors are available with any Personalization plan. To learn more, check out Optimizely Personalization.

Code mode 

If you have particularly complex audience requirements that might be difficult to build with Optimizely's drag-and-drop interface, you can create them by adding custom JSON in the Audience Conditions box. To do this, check Code Mode.


Type or paste your custom JSON in the code box.

Once you've finished specifying the conditions for your audience, click Save Audience.


Congratulations - you've created your first audience!