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

# Audiences

> Every visitor rule ABTestly ships. Device, geo, source, history, and a handful of custom escape hatches.

An Audience is a set of visitor rules. Rules combine with AND. Leave
the Audience blank on an experiment to include everyone.

<Frame caption="Saved Audiences under Site → Audiences.">
  <img src="https://mintcdn.com/abtestly/pnpJFDTFa50Ks6SL/images/audiences-list.png?fit=max&auto=format&n=pnpJFDTFa50Ks6SL&q=85&s=6e6ed97b998a9ba149b076e4d50efdb1" alt="Audiences list" width="2400" height="1141" data-path="images/audiences-list.png" />
</Frame>

## Visitor category

* **Device**, Desktop, Mobile, Tablet. Multi-select.
* **Browser**, Chrome, Safari, Firefox, Edge, Opera, others.
* **Operating system**, Windows, macOS, iOS, Android, Linux, others.
* **Language**, the visitor's preferred `Accept-Language`.

Device/browser/OS are derived server-side at ingest from the user
agent. Client-side spoofing does not fool the categorization.

## Geo

* **Country**, multi-select from the ISO list.
* **Region**, case-insensitive text match.
* **City**, case-insensitive text match.

Geo is looked up at the edge (`GET /g`) once per session, cached, and
served from Cloudflare's country/region/city data. Bounded wait of
250 ms, if the lookup times out, the visitor is treated as
"unknown country" and geo-dependent rules do not match. See
[Geo](/targeting/geo) for the failure-mode details.

## Visitor history

* **New vs returning**, a 30-minute gap defines a new session.
* **Visit count**, how many sessions this visitor has had on your
  site.
* **Days since last visit**.
* **Pages viewed**, this session.
* **Has completed goal X**, whether the visitor has ever converted on
  a specific goal in your library.

History rules require the site to have the
[behavioral substrate](/developer/spa-lifecycle) turned on. It is on
by default for sites created after mid-2026.

## Traffic source

* **Referrer**, the `document.referrer` header.
* **UTM source** / **medium** / **campaign** / **term** / **content**.

Referrer is bucketed into a friendly source ("google", "facebook",
"direct") for the picker, but you can also match on the raw hostname.

## Time

* **Day of week**, Mon through Sun, multi-select.
* **Hour of day**, 0–23, multi-select.

Both are evaluated in your **project timezone**. Set the timezone
under [Settings → General](/settings/general).

## Custom

* **Cookie value**, read a cookie by name, match on its value.
* **JavaScript condition**, a boolean expression you write. Evaluated
  on the page each time the audience is checked.

<Warning>
  JavaScript conditions run in the same context as your other page
  scripts. They need `unsafe-eval` in your CSP if you have one. Prefer a
  cookie or a data attribute if you can, they are easier to reason
  about and do not need CSP loosening.
</Warning>

## Location vs Audience

If your instinct is "match on URL", that is a Location rule, not an
Audience rule. See [URL rules](/targeting/url-rules).

If your instinct is "match on the visitor", it is Audience. Everything
else on this page.

## Saved audiences

You can define an Audience inline on an experiment, or save one under
**Site → Audiences** to reuse. See
[Saved lists](/targeting/saved-lists) for when to reach for a saved
Audience.

## Silent rule failures

An Audience that never matches, because a rule references a cookie
that does not exist, or a JavaScript condition that always throws.
silently excludes every visitor. The experiment then looks like it
"is not running". If yours seems to have zero exposures after a
sensible amount of time, walk the audience rules one by one in the
[preview modal](/preview/preview-modal), the QA overlay shows why
each check passed or failed.
