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

# Test sort orders by audience

> Run a sort order experiment for new or returning shoppers, choose the right audience definition, and keep mobile app traffic out of the results.

You can run a [sort order experiment](https://docs.uselayers.com/help/sort-orders/experiments.md) for one group of shoppers only, for example to check whether returning shoppers respond better to a 14-day Best Selling window than a 7-day one. Before you start, make sure the audience you pick matches the shoppers you have in mind.

## Prerequisites

* A live sort order to test, and at least one challenger sort order.
* Access to **Experiments** and **Audiences** in the Layers dashboard.

## Pick the right audience

"Returning" can mean two different things, and Layers keeps them apart:

| You mean | Use | Who it includes |
| - | - | - |
| Someone who has visited before | **Returning visitors** | Shoppers Layers recognizes from an earlier visit, **including guests** who have never bought anything. |
| Someone on their first visit | **New visitors** | Shoppers on their first tracked visit, with or without a customer account. |
| A logged-in customer | **Signed-in shoppers** | Shoppers logged in to a customer account. |
| A customer who has bought more than once | **Repeat buyers** | Customers with **two or more** orders. |

Returning visitors is usually much larger than the customer-based audiences, because most returning traffic is guests.

### Target customers with at least one past order

None of the default audiences means "has bought at least once." To target those shoppers, [create an audience](https://docs.uselayers.com/help/configuration/manage-audiences.md#create-an-audience) with the condition **Number of Orders** is greater than or equal to **1**.

Layers gets a shopper's order count from their customer account, so this audience mostly reaches signed-in customers. Past buyers who are browsing as guests usually don't match. Check the audience's [traffic estimate](https://docs.uselayers.com/help/configuration/manage-audiences.md#read-the-traffic-estimate) to see how much traffic it covers before you base an experiment on it.

## Narrow the experiment to the audience

1. Create the experiment from **Experiments**, then pick the control and challenger sort orders.
2. In **Who gets split**, click **Narrow the audience** and add the audience or conditions you chose.
3. Shoppers who don't match see the control sort order and aren't counted in the results.

The narrower the audience, the longer the experiment takes to reach the 100 sessions per group that Layers needs before it reports confidence.

## Keep mobile app traffic out

If you also serve a mobile app through Layers, such as Tapcart, Fuego, or Canvas, app shoppers can land in your experiment too. Mobile apps don't send click or purchase events to Layers, so Layers already leaves app traffic out of click-through rate, purchase rate, and click-to-order rate. Session counts and session-based metrics such as conversion rate and revenue per session can still include app sessions.

To keep app shoppers out of the experiment entirely, add the condition **Shopping Channel** is **Web** under **Narrow the audience**. You can combine it with any of the audiences above.

## Troubleshooting

* **The experiment never gets past Not tested:** the audience is too small. Widen it, give the experiment a larger share of traffic, or let it run longer.
* **Returning visitors behaves like all traffic:** that's expected when most of your traffic is returning guests. Use a customer-based audience if you care about past buyers.
* **A customer-based audience has almost no traffic:** few shoppers are signed in. Order history comes from the customer account, so guests rarely match.

## Next steps

* [Sort order experiments](https://docs.uselayers.com/help/sort-orders/experiments.md) for setup, traffic splits, and reading results.
* [Manage audiences](https://docs.uselayers.com/help/configuration/manage-audiences.md) to build and reuse audiences.
* [How Best Selling works](https://docs.uselayers.com/help/sort-orders/how-best-selling-works.md) to tune the sales window you're testing.
