Skip to main content
menu_icon.png

Everything you need to learn Optimizely X in one place: See our resource pages for Web Experimentation and Personalization.

x
Optimizely Knowledge Base

Set up audiences in Optimizely X

This article is about Optimizely X. If you're using Optimizely Classic, check this article out instead.
 
relevant products:
  • Optimizely X Web Experimentation
  • Optimizely X Web Personalization

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 X or add existing ones to your experiments
  • 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.

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. Scroll down for step-by-step instructions.

 

Create an audience 

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 dashboard. This is where you'll define the conditions you want your visitors to meet in order to become part of the audience for this experiment.

But first, name your new audience:

Add conditions 

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

You can always add more conditions to your audience requirements. Optimizely X 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 a) live in a specific set of cities, and b) use a specific operating system, you would add Platform / OS to the 'and' conditions box:

Under these conditions, only visitors who use Linux and live in one of the cities you selected (in this example, Detroit, Austin, Salt Lake City, Worcester or Asheville) 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 / 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.
  • 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 JavaScriptYou can write your own JavaScript condition that must be matched before an experiment is run. 
  • DeviceAdds 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.
  • 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 / 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.
  • 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 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 plans.
  • Uploaded Audiences: Lets you upload lists of query parameters, cookies, or ZIP codes and target experiments to visitors who match them.

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

For more detailed information on audience conditions, check out this article.

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.

If you've been using custom dimensions in Optimizely Classic, custom attributes are the same concept with a new name. We've raised the limit, so now you can create up to 100 attributes instead of 10 dimensions. 

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, maybe you want to limit the audience for an experiment to viewers who have visited your site's home page recently. To do that, click Visitor Behaviors under Conditions, and then drag Home into the Audience 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!