---
title: Target audiences using the Audience Builder
slug: web-experimentation/docs/LlGT-target-audiences-using-the-audience-builder
docTags: 
createdAt: 2026-07-20T15:45:03.515Z
---

- Optimizely Web Experimentation
- Optimizely Personalization
- Optimizely Performance Edge

## Create an audience

1. Go to the **Audiences** dashboard, which lists audiences.

   ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/IJiaf_ZOdr6KW5YPKSUo0-20260720-150032.png" size="100" isUploading="false" showCaption="false"}
2. Click **Create New Audience**\*. \*The **Create New Audience** page displays where you define the conditions you want your visitors to meet to become part of the audience. Enter a **Name** for your audience:

   ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/1J1VJheuu5R7qmjGLX0n1-20260720-150032.png" size="100" isUploading="false" showCaption="false"}

### Add conditions

1. Under **Conditions**, select **Standard** to display a drop-down list of commonly used condition categories.
2. Choose the [conditions](docId\:lQFY_WXMJojQTnBgQ-PAe) you want to use to define your audience. There are many built-in criteria you can work with. For example, you can limit the audience for your experiment to visitors who use a specific browser, live in specific areas, or speak only certain languages. If you want to create an experiment that is visible only to visitors who are located in certain cities, drag **Location** from **Conditions** to **Audience Conditions**\*,\* on the left.
3. 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 want. 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.

   ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/oW7cRHax3DoQhjdeAeKJu-20260720-150032.png" size="100" alt="targeting-new-audience-1.png" isUploading="false" showCaption="false"}

### AND and OR conditions 

You can add conditions to your audience requirements. Optimizely Web Experimentation and Optimizely Performance Edge provide two areas for you to add more conditions, depending on whether they are **or** or **and** conditions.

- Conditions you add to the **or** conditions box will expand your audience (such as visitors from the United States or Canada).

  ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/XU24QewvVhgi3uFN9xXMd-20260720-150032.png" size="100" alt="targeting-new-audience-2.png" isUploading="false" showCaption="false"}
- Conditions added to the **and** conditions box will shrink your audience (such as visitors from the United States who are using an iPhone).

  ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/OgC2oMO68LnXzp2EDi8A0-20260720-150032.png" size="100" alt="targeting-new-audience-3.png" isUploading="false" showCaption="false"}

A *logged-in mobile visitors* audience may have two AND conditions. Both must match for a visitor to be included in this audience.: 

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

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 

You can create highly-specific, well-targeted audiences with Optimizely Web Experimentation's list of built-in standard audience conditions.

- **Ad Campaign** – Adds visitors to your experiment based on specific `utm_campaign` parameters.
- **Browser** – Include or exclude visitors who are using specific browsers.
- **Cookie** – Adds 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 targets any cookie value. Targets audiences based on logged-in status or other information passed through cookies.
- **Custom JavaScript** – Write your own JavaScript condition that must be matched before an experiment is run. 
- **Device** – Choose among visitors' iPhones, other mobile phones, iPads, other tablets, or desktop/laptops.
- **IP Address** – Adds visitors to your experiment based on their IP address range.
- **Language** – Adds visitors to your experiment based on the preferred language choice (ex. en-us) that they set in their browser. This lets you target by country in most cases.
- **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 geo-targeting.
- **New/Returning Session** – Adds visitors to your experiment based on whether this is the first session in which they are exposed to your Optimizely Web Experimentation snippet. Visitors who return in a different session later will become "returning" visitors.
- **Platform / OS** – Adds visitors to your experiment based on the platform or operating system they are using. Choose between mobile and desktop platforms.

  :::hint{type="info"}
  **Note**

  Optimizely Web Experimentation cannot differentiate among specific versions of operating systems because of web browser limitations (User Agent request header). For information, see Chrome's developer documentation on [user-agent reduction](https://developer.chrome.com/docs/privacy-sandbox/user-agent/).
  :::
- **Query Parameters** –  Adds 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 (such as Google, Facebook, and so on).
- **Time/Day of Visit** – Adds visitors to your experiment based on the day and time when they visit.
- **Traffic Source** – Adds visitors to your experiment based on the referrer (campaign, search, referral, or direct). 

You can also create your own audience conditions in JSON. See the following [Code Mode  section](docId\:tSoFLwt3tc93lZ30vPaLd) for information on how to do that.

### Custom attributes 

You can also use [custom attributes](docId:3kT0et8s5S8T25ZUCKQes) 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 Web Experimentation through the JavaScript API. Each dimension can 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 and segmenting results.

### Visitor behaviors 

You can 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 click** into the **and** conditions box:

![targeting-new-audience-4.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/RraSF7BjNeybeWrPg8iWL-20260720-150031.png)

## Code mode 

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

![targeting-new-audience-5.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/jeZRYPK4K8wLENiMLZOlB-20260720-150032.png)

Type or paste your custom JSON in the code box.

When you finish specifying the conditions for your audience, click **Save Audience**.
