For the complete documentation index, see llms.txt. This page is also available as Markdown.

Targeting and audiences

How Amply decides who sees what. A campaign reaches a user only when that user matches the campaign's conditions. This page explains the vocabulary: rules, operators, audiences.

Rules are built from conditions

A rule is a list of conditions you combine in the rule builder. Each condition compares one attribute against one value using one operator.

Plain example:

Users whose country is France AND whose subscription_status equals premium AND who installed the app in the last 30 days.

That is three conditions joined with AND. Each condition follows the same shape:

<attribute>           <operator>          <value>
country               equals              France
subscription_status   equals              premium
install date          is less than        30 days ago

You build this in the dashboard's rule builder by adding conditions one at a time. Conditions are joined with AND — every condition must pass for a user to match. Within a single condition, list-style operators give you an internal OR — "country is one of France, Germany, Italy" matches a user in any of the three.

Attributes you can target on

Attributes are grouped by where they come from. See User attributes for the full picture; here is what you can use in targeting conditions today:

  • Country — the device's country.

  • OS version — the device OS version (for example, iOS 17).

  • App version — the current app version installed on the device.

  • App install version — the version of the app at install time (useful for "only users who installed after v3.0").

  • Application — which app in your project (include or exclude a specific app).

  • Install date — when the user first installed the app. Works as an absolute date ("installed after 2026-01-01") or a relative one ("installed in the last 7 days").

  • Custom properties — values you set on the user from your app code (plan tier, premium status, internal user type).

For the full list and when to use which, see User attributes.

Operators

The operator set changes slightly by attribute type, but the vocabulary is small.

Numeric and version comparisons:

Operator
Meaning

equals

exactly equal

not equal

anything but this value

greater than

strictly greater

less than

strictly less

greater or equal

greater than or the same

less or equal

less than or the same

Existence checks:

Operator
Meaning

is set

the user has a value for this attribute

is not set

the user has no value

List membership (for country, application):

Operator
Meaning

include

match when the user's value is in the list

exclude

match when the user's value is NOT in the list

Dates:

Dates support absolute ("on or after 2026-01-01") and relative ("in the last 30 days") forms.

Audience — the result of a rule

An audience is the set of users who currently match a rule. It is not a stored list. It is evaluated on-device every time a campaign is considered, using the latest attributes. A user who was in an audience yesterday can drop out today (for example, the user updated to a new app version, or changed country on vacation).

This matters: audiences are live. You do not "refresh" or "rebuild" them. A campaign that says "users in France on app version ≥ 5.0.0" will immediately pick up a French user the moment they upgrade.

Targeting on past behavior

To gate on what users did before, track the event when it happens and also set a custom property on the user. The rule builder targets on the property; the event is the trigger that lets your code set the property.

When a user completes onboarding, fire OnboardingCompleted and setCustomProperty("has_onboarded", true). A campaign for "users who have NOT yet finished onboarding" then targets has_onboarded is not set (or = false).

The result is a rich audience composed of attribute and property conditions, all joined with AND. See Campaign delivery for how triggers then decide when the campaign actually fires for those users.

Targeting vs. triggering

These are often confused.

  • Targeting decides who is eligible. "Is this user a match for this campaign?"

  • Triggering decides when the eligible user sees it. "Has the right thing just happened?"

A user can be targeted by ten campaigns but only one triggers on any given event. See Scenarios and campaigns and Campaign delivery for how the two layers interact.

Practical examples

  • "France or Germany, premium users" — country IN [France, Germany] AND custom property plan = "premium".

  • "New users on the latest app version" — install date in the last 7 days AND app version >= 3.4.0.

  • "Lapsing premium users" — custom property plan = "premium" AND custom property trial_ends_at is within the next 3 days.

  • "Users who never finished onboarding" — custom property has_onboarded is not set, or equals false.

Last updated