> For the complete documentation index, see [llms.txt](https://docs.amply.tools/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amply.tools/user-guide/targeting-an-audience.md).

# Targeting an audience

How to narrow a campaign from "everyone" down to the right slice of users, using the rule builder in the campaign form's **Who** step.

> Dashboard walkthrough. For the targeting model and the attributes you can target, see [Targeting and audiences](/concepts/targeting-and-audiences.md).

**Use this when** a campaign should only apply to some users — a country, an app version, users who installed recently, or users who match a property you control. **Don't use this when** you want to control *when* a campaign fires (that's the **When** step and the triggering event) or *what* it shows (that's the **What** step).

## Where to find it

Audience rules live in the **Who** step of the campaign form:

1. Open a project → **Campaigns** → **New campaign** (or open an existing draft).
2. Fill in the name and type in step one.
3. On the **Who** step, start from **All users** and click **Add rule**.

Every rule you add narrows the audience. Multiple rules combine with **And** — a user must match all of them. There is no "or" between rules; if you need an either/or audience, make two separate campaigns.

## Rule types and operators

Each rule lives in its own card. Add, edit, or remove rules in any order.

| Rule                        | Operators                                                 | Example                                           |
| --------------------------- | --------------------------------------------------------- | ------------------------------------------------- |
| **Countries**               | include / exclude one or more countries                   | Include **Germany, France, Spain**                |
| **OS Version**              | `=`, `!=`, `>`, `<`, `>=`, `<=`                           | `>=` `17` (iOS 17 and up). Add twice for a range. |
| **App Version**             | same as OS Version                                        | `>=` `4.2.0`                                      |
| **App Install Version**     | same as OS Version                                        | `>=` `3.0.0` and `<` `4.0.0` (twice)              |
| **Applications**            | include / exclude one or more applications in the project | Include the iOS build only                        |
| **Custom Property**         | depends on the value type — see below                     | `tier` `=` `premium`                              |
| **Install Date — absolute** | is, is before, is after                                   | "is after 2026-01-01"                             |
| **Install Date — relative** | is less than N days, is more than N days                  | "is less than 7 days"                             |

Custom Property operators by value type:

| Type     | Operators                                           |
| -------- | --------------------------------------------------- |
| String   | `=`, `!=`, is set, is not set                       |
| Number   | `=`, `!=`, `>`, `<`, `>=`, `<=`, is set, is not set |
| Boolean  | `=`, `!=`, is set, is not set                       |
| DateTime | is, is before, is after, is set, is not set         |

**Is set** and **is not set** check whether the property exists on the user at all — they don't need a value. Property keys are suggested from what the SDK has reported for this project; pick from the dropdown to avoid typos.

## Worked examples

### Paying users on iOS 17+ in Germany

1. **Custom Property** — `subscription_status` `=` `active`
2. **Countries** — include **Germany**
3. **OS Version** — `>=` `17` (and consider filtering by application for iOS-only)

### New users on the latest app version

1. **Install Date** — is less than **14** days ago
2. **App Version** — `>=` `5.0.0`

### Everyone except early adopters on old builds

1. **App Install Version** — `>=` `4.0.0`
2. **App Version** — `>=` `5.0.0`

### Power users with a specific flag

1. **Custom Property** — `lifetime_purchases` `>=` `5`
2. **Custom Property** — `beta_opt_in` is set

## Tips

* **Start broader than you think.** A too-narrow audience that matches almost nobody looks the same as a broken campaign. Widen, confirm it fires, then tighten.
* **Name custom properties consistently.** Amply's convention is `snake_case` for property keys (and `PascalCase` for event names). The dropdown shows exactly what the SDK reported — match whatever your developer set up.
* **If a property isn't in the dropdown,** the SDK hasn't sent it yet from any device in this project. Trigger it on a test device first.
* **Country rules use device region, not IP.** A user travelling abroad still counts as their device's region.
* **Install date reflects the first install Amply saw.** Uninstall and reinstall resets it.

## Related

* [Targeting and audiences (concepts)](/concepts/targeting-and-audiences.md) — the model behind rules and attributes
* [Creating a campaign](/user-guide/creating-a-campaign.md) — full walk-through of the campaign form
* [Sessions and events](/user-guide/sessions-and-events.md) — confirm your custom property is arriving
* [User attributes](/developer-guide/user-attributes.md) — how developers set custom properties from the SDK


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amply.tools/user-guide/targeting-an-audience.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
