> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abconvert.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Audience Targeting

> Target only the visitors you want in the test.

Audience targeting limits a test to visitors who match the conditions you set. Each condition is one fact about the visitor. A visitor must match every condition you add.

<Info>
  Audience targeting decides *who* enters. To limit a template or visual editor test to certain pages, see [Page targeting](/targeting/page-targeting). For the whole flow, see the [Targeting overview](/targeting/overview).
</Info>

## When to use it

* Test a free shipping banner for Canada only.
* Run a landing page test only on visitors from paid social ads.
* Test a stacked product page layout on phones.
* Test a welcome offer for visitors from one campaign.
* Run a wholesale price test for wholesale accounts only.
* Test a shipping message only for visitors from your European market.

## When NOT to use it

* **You want a template or visual editor test on certain pages.** A condition decides who enters, not which pages change. Use [page targeting](/targeting/page-targeting).
* **You want matching visitors in a fixed test group.** A condition only lets visitors in. Use a [targeting rule](/targeting/overview#targeting-rules).

## Before you start

* The [ABConvert app embed](/configuration/settings#theme-connection) must be on in your theme, or the test does not run.
* If you use **Visitor type**, turn the app embed on well before the test starts. Visitors who came before it was on have no record, so they count as new.

## Conditions

<Frame caption="Paid Search visitors on mobile, new since the test started, in the United States market.">
  <img src="https://mintcdn.com/abconvert/nYSloYffhPjbXZQE/images/targeting/audience-card.png?fit=max&auto=format&n=nYSloYffhPjbXZQE&q=85&s=4093ceb2ed34bd91c8cd82a059c626d4" alt="Audience Targeting card with the basic conditions" width="2114" height="1246" data-path="images/targeting/audience-card.png" />
</Frame>

| Condition                             | What it checks                                                                       | Example                                               |
| ------------------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------- |
| **Countries**                         | The visitor's country, from their IP address                                         | `Canada`, `United States`                             |
| **Traffic sources**                   | The channel or platform the visit came from. See [Traffic sources](#traffic-sources) | `Paid Social`, `Google`                               |
| **Devices**                           | Desktop or mobile, from the browser. Tablets count as mobile                         | `Mobile only`                                         |
| **Visitor type**                      | New or returning, relative to the test start                                         | `New visitors only`                                   |
| **Markets** (Beta)                    | The Shopify Market the visitor is browsing                                           | `Europe`, `North America`                             |
| **Customer**, **Logged in** (Beta)    | Whether the visitor is signed in                                                     | **Is** `Yes`                                          |
| **Customer**, **Tags** (Beta)         | The customer's tags                                                                  | **Includes** `wholesale`                              |
| **Customer**, **Orders count** (Beta) | How many orders the customer has placed                                              | **Is more than** `2`                                  |
| **Customer**, **Total spent** (Beta)  | What the customer has spent, in your store currency                                  | **Is more than** `500`                                |
| **Referral domain**                   | The site the visitor came from                                                       | **Is** `newsletter.example.com`                       |
| **Landing page**                      | The path of the first page of the visit                                              | **Starts with** `/collections/sale`                   |
| **URL parameter**                     | One query parameter, by name                                                         | `utm_campaign` **Is** `spring`                        |
| **Cookie**                            | One cookie, by name                                                                  | `region` **Is** `apac`                                |
| **Custom JavaScript** (Beta)          | The result of an expression you write                                                | See [Custom JavaScript](/targeting/custom-javascript) |

<Frame caption="Three conditions. The visitor must match all of them.">
  <img src="https://mintcdn.com/abconvert/nYSloYffhPjbXZQE/images/targeting/advanced-filters.png?fit=max&auto=format&n=nYSloYffhPjbXZQE&q=85&s=9798028af80c1af5de9256d49ce601e6" alt="Three audience conditions set together" width="2080" height="1836" data-path="images/targeting/advanced-filters.png" />
</Frame>

## How it works

1. ABConvert reads every condition in the visitor's browser, on the first page where the test could run.
2. If a value it needs is unknown on this page, it decides nothing and tries again on the next page.
3. If the visitor matches every condition, they go on to [targeting rules](/targeting/overview#targeting-rules) and the [random split](/targeting/overview#how-it-works). If not, ABConvert excludes them and never counts them.
4. ABConvert remembers the decision, even if the value changes later.

## Customer conditions can change

**Customer** conditions are the only exception to step 4, because a visitor can sign in or out after the decision. ABConvert remembers the tags, orders count, and total spent of the last customer who signed in on the device, so signing out alone does not change the result. If a visitor in the test stops matching, the test stops applying to them until they match again:

* They see the original store from that page load on.
* Nothing they do while it is stopped counts toward the test's analytics.
* Their test group is kept. When they match again, they see the same test group as before.

For example, a test for customers tagged `wholesale`:

1. Anna signs in, enters the test, and sees Variant A.
2. She signs out. ABConvert remembers her details on that device, so she still sees Variant A.
3. You remove the `wholesale` tag from her account. The next time she signs in, she stops matching and sees the original store.
4. You add the tag back. She signs in and sees Variant A again.

**Orders count** and **Total spent** work the same way. A test for customers with fewer than three orders stops applying after they place their third order.

## When the value is unknown

| Situation                                                   | What the condition reads                       | What happens to the visitor                                       |
| ----------------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------- |
| Country lookup has not finished                             | Nothing yet                                    | Not decided on this page. ABConvert tries again on the next page. |
| Visitor has never signed in on this device                  | Nothing                                        | Decided as a guest.                                               |
| Visitor is signed out, but signed in earlier on this device | The last customer who signed in on this device | Decided as that customer.                                         |

## Traffic sources

ABConvert decides the source on the first page and keeps it for the whole visit.

It reads the click IDs and UTM parameters in the URL, and the site the visitor came from.

You can pick a channel, a platform, or both. A visit matches if it matches any value you picked.

| Channel            | When ABConvert assigns it                                                               |
| ------------------ | --------------------------------------------------------------------------------------- |
| **Paid Search**    | Google or Bing ads                                                                      |
| **Organic Search** | Google or Bing search results, or any visit from Yahoo, DuckDuckGo, Baidu, or Yandex    |
| **Paid Social**    | Facebook, Instagram, TikTok, Twitter, or YouTube ads                                    |
| **Organic Social** | Those platforms, not ads, including the Facebook, Instagram, and TikTok in-app browsers |
| **Email**          | `utm_source` or `utm_medium` is `email`                                                 |
| **SMS**            | `utm_source` or `utm_medium` is `sms` or `text`                                         |
| **Affiliate**      | `utm_medium` is `affiliate`                                                             |
| **Referral**       | Any other site                                                                          |
| **Direct**         | No referring site and no UTM parameters                                                 |

ABConvert checks the platforms first. A visit from Google or Facebook takes that channel even when the link carries `utm_medium=email`.

Platforms: **Google**, **Facebook**, **Instagram**, **TikTok**, **Twitter**, **YouTube**.

## Examples

**Mobile visitors from a Meta campaign in the US.** Three conditions, all required:

* **Countries**: `United States`
* **Devices**: `Mobile only`
* **URL parameter**: `utm_source` **Is** `meta`

**Repeat customers who are not wholesale.** Two **Customer** conditions:

* **Orders count** **Is more than** `1`
* **Tags** **Does not include** `wholesale`

**Visitors who landed on any sale collection.** One condition:

* **Landing page** **Starts with** `/collections/sale`

## Common mistakes

* **Picking the platform when you mean the channel.** **Google** matches Google Ads and Google Search visits. To target ads only, pick **Paid Search**. That covers Bing ads too.
* **Using Landing page to choose where the test runs.** It reads the first page of the visit only. Use [page targeting](/targeting/page-targeting).
* **Turning the app embed on the day the test starts.** Visitors who came before have no record, so **Visitor type** counts them all as new.

## FAQ

<AccordionGroup>
  <Accordion title="Do conditions slow down my store?">
    No. Most conditions read values already on the page. **Countries** needs one lookup that does not block the page. If it has not answered, the visitor is decided on the next page instead.
  </Accordion>
</AccordionGroup>
