---
title: Segment your results
slug: personalization/docs/segment-your-results
docTags: 
createdAt: 2026-08-05T20:59:35.632Z
---

- Optimizely Web Experimentation
- Optimizely Personalization

By default, Optimizely Web Experimentation and Optimizely Personalization show results for all visitors who enter your experiment. However, not all visitors behave like your average visitors. Segmenting lets you filter your unarchived experiment results to see if certain groups behave differently from your visitors overall. 

You can filter results in the [Optimizely Experiment Results page](docId\:mrUblIuNVOZc1dvjWdsbw) and [Optimizely Personalization Campaign Results page](docId\:sj1EYiso-B8iiIxtEcwEI) with the following [default segments](docId\:fvtF9GogqH0QhzuLexs9z) that Optimizely captures automatically:

- Browser type
- Campaign
- Device type
- Referrer
- Source type

You can also add [custom attributes](docId:3kT0et8s5S8T25ZUCKQes) to your experiments and campaigns and use these attributes for custom segmentation to get a more granular view of your business's most important visitors.

For example, you run an experiment that tests a pop-up promotional offer. This generates a positive lift overall, but segmenting visitors on mobile devices is a statistically significant loss. Maybe the pop-up is disruptive on a mobile device or difficult to close. When you implement the change or run a similar test in the future, you might consider excluding mobile visitors based on what you have learned.

Segmenting results helps you see beyond the average visitor's behavior and improve your experimentation program.

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

Optimizely Web Experimentation does not offer segmentation by audience.
:::

## Default segments

Optimizely Web Experimentation and Optimizely Personalization capture several default attributes that you can use to segment your Results page.

:::hint{type="warning"}
**Important**

You must have at least one visitor assigned to an attribute for it to display on your Results page.
:::

- **Browser type**
  - Firefox
  - Google Chrome
  - Internet Explorer
  - Opera
  - Safari
  - Unknown
- **Campaign** – Visitors who enter the experiment with the parameter [utm\_campaign](https://support.google.com/analytics/answer/1033867) capture the parameter value. Use this value to examine campaign keywords like *holiday\_sale*.

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

  There is a 20-character limit for values. Longer values are truncated.
  :::
- **Device type** 
  - **Desktop/laptop** – Visitors rising from a desktop or laptop.
  - **All phones** – Visitors using any mobile phone. It is a combination of the **iPhone&#x20;**&#x61;n&#x64;**&#x20;Other phone** segments.
  - **iPhone** – Apple iPhone visitors
  - **Other phones** – Visitors using a mobile phone that is not an iPhone.
  - **All tablets** – Visitors using any tablet. It is a combination of the **iPad** and **Other tablets** segments.
  - **iPad \*** – Visitors using iPads.
  - **Other tablets** – Visitors using tablets that are not iPads.
  - **Other devices** – Visitors using devices not identified as desktops, laptops, phones, or tablets.
  - **Desktop (deprecated)** – Visitors using a desktop, laptop, or other device. Use the desktop/laptop segment to focus on visitors using traditional desktop browsers.
- **Referrer** – Initial referrer or the originating URL (the URL of a page outside the domain of the snippet that the visitor navigated from before landing on a page where the snippet is implemented).
  For example, if a visitor navigates to your domain by clicking on a link on `https://www.facebook.com/search/top`, events triggered during the session have a referrer value of `https://www.facebook.com/search/top`.
- **Source type**
  - **Campaign** – Visitors that arrive on a URL containing a `utm_campaign`, `utm_source`, `gclid`, or `otm_source` query parameter. If the URL contains one of these parameters, the visitor counts as **Campaign** traffic even if they arrived through **Search**.
  - **Search** – Visitors that visit through a referral URL containing Bing, Google, Yahoo, or Baidu but not a specific campaign parameter (otherwise, they would be bucketed as **Campaign**).
  - **Referral** – Visitors from another URL that do not count as **Campaign&#x20;**&#x6F;r **Search**.
  - **Direct** – Visitors who do not have any external referrer in their URL.

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

\*Apple changed the user agent for iPad in iOS 13 such that it displays as **Desktop/laptop** traffic in Optimizely and other analytics tools. This may increase **Desktop/laptop** traffic and decrease iPad traffic when segmenting your results.
:::

The **Source type\*&#xA0;**\*value is based on the `document.referrer` value in the browser, except Campaign. The visitor **Source type** value may change as they navigate your site, such as a checkout flow with a step where the visitor goes to a third-party site or different subdomain and then returns. Visitors would have an original **Source type** value (**Campaign**, **Referral**, or **Direct**) until they leave the site. When the visitor returns, they have a referral value because Optimizely detects that they went to another site.

You may see the same visitor's conversions in segments for different **Source type** values on your Results page. For example, conversions that the visitor made *before* leaving the site display in **Campaign** or **Direct**. Conversions triggered *after* the visitor returns show in **Referral** without affecting the earlier conversions.

## Custom segmentation

You can [create custom attributes](docId:3kT0et8s5S8T25ZUCKQes) and use them for custom segmentation (with more granularity) on the Results page. Custom attributes describe key characteristics of your different visitors. Use them to segment your Results page in the exact same way as [default segments](docId\:fvtF9GogqH0QhzuLexs9z).

For example, you might create a custom attribute that targets by plan type, which includes the following values: basi&#x63;*,&#x20;*&#x70;lu&#x73;*,&#xA0;*&#x61;nd premium. You can use these to segment your results and identify when visitors with a basic plan behave differently from visitors with a premium plan.

## Segment the Results page

You can segment your [Optimizely Experiment Results page](docId\:mrUblIuNVOZc1dvjWdsbw) and [Campaign Results page](docId\:sj1EYiso-B8iiIxtEcwEI). Segmenting results help you get more out of your data by generating valuable insights about your visitors.

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

Segments and filters should only be used for data exploration, [not making decisions](docId\:fvtF9GogqH0QhzuLexs9z).
:::

In the **Segment** drop-down list, you see default segments and custom segments for any attributes assigned to at least one visitor in the experiment.

![segment-results-web.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Dxcg4w6a6xCQK0FSrGt5O-20260720-150119.png)

1. Go to your Results page.
2. Click **Segment&#x20;**&#x61;nd select one or more attribute values from the drop-down list.
3. Choose **Match All Values** or **Match Any Value** if selecting multiple.
4. Click **Apply.**

## Match All Values and Match Any Value

When you select more than one attribute value from the segmentation menu, the Results page can display visitors who match all values or visitors who match one or more values. The radio buttons control this behavior, labeled **Match All Values&#x20;**&#x61;nd **Match Any Value.**

For example, you implement two custom attributes to track a visitor's location and plan type. If you want to see how visitors in the United States (US) with a Gold plan responded to your variations, your segmentation configuration looks like the following:

**Match All Values**

- **Location&#x20;**– US
- **Plan Type&#x20;**– Gold

If you select **Match Any Value** instead, the Results page displays data for visitors who are in the US *combined with* data for visitors who have a Gold plan.

## How visitors are counted in segments

For information on how Optimizely counts conversions when segmenting, see the following:

- [How Optimizely counts conversions](docId\:onBazDzYYz526tL9aQF0s)
- [How attributes and segmentation work](docId:_sy-mNT1TCvYW-EA2m_Ls)

## Geo results segmentation

If your Optimizely plan includes geo-location for audiences, you can use Optimizely's geo-location script to obtain location information, fetch geo data using Optimizely's (Akamai's) geolocation service, and pass it as a custom attribute in Web Experimentation for segmentation, such as segmenting results by visitors in the US.

### Prerequisites

To use geolocation features, ensure you have a global or site-wide experiment running with a location-based audience, such as an [A/A test](docId\:fU2vq4_5ewvygxgC6FzT_). This triggers the `geo.js` script, which fetches the visitor's location.

To load the geolocation snippet (`geo.js`)

- Ensure at least one experiment uses a geo-location audience. Without this, the visitor's location is not fetched.
- Run a dummy experiment with a geo-audience, even if you do not plan to use this information for any audiences.
- Ensure the dummy experiment runs on pages where you need geolocation data. This lets you track events for the experiment and segment your audience effectively.

### Steps

The following steps describe how to retrieve the country from the location object and pass it to a custom location attribute.

1. Create an experiment with an audience that targets a location (any location). This ensures that the `geo.js` script is loaded on the page, which in turn adds a location object to the Optimizely visitor object.
2. Create custom attributes to leverage the available geo parameters, such as city, continent, country, Designated Market Area (DMA), and region.
3. Add the relevant code snippet to your [Project JavaScript](docId\:fvtF9GogqH0QhzuLexs9z) to subscribe to the `onActivated` notification listener. See the the developer documentation on [activated ](docId:0jm-amfClAP9cZuwCrXTg)for information.

```javascript
window.optimizely = window.optimizely || [];

function onActivated() {
  let visitor = window.optimizely.get('visitor');
  let country = "";
  if (visitor.location.country) {
    window.optimizely.push({
      "type": "user",
      "attributes": {
        "location": visitor.location.country,
      }
    });
  }
}

window.optimizely.push({
  type: "addListener",
  filter: {
    type: "lifecycle",
    name: "activated"
  },
  handler: onActivated
});
```

4. Define your attributes within the callback function.

```javascript
let visitor = window.optimizely.get('visitor');
let country = "";
if (visitor.location.country) {
  window.optimizely.push({
    "type": "user",
    "attributes": {
      "location": visitor.location.country,
    }
  });
}
```

Now, you should be able to view the segmented results in the Results page.

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

If you use the [Chrome DevTools](docId\:syV6dWrXTf5oJQp5lBQ67) to change your location using Sensors, the browser's global navigator object shows this new location. However, the `geo.js` script does not recognize this change. Instead, it continues to use the original location data, ignoring the simulated changes made in the developer tools.  See [Sensors: Emulate device sensors](https://developer.chrome.com/docs/devtools/sensors) in the Google documentation for information. 
:::
