Audience matched

Learn how to check if a user has matched a specific audience.

This expression checks if a user has matched one or more audiences based on Audience matched events.

Syntax

The basic syntax for this expression is:

user has matched audience /*<audience>*/

The negation of the expression can be expressed as:

user has not matched audience in /*<audience>*/

You can refine the expression with quantifiers and time windows:

user has matched audience /*<audience>*/ /*<quantifier>*/ /*<window>*/

Parameters

These are the supported parameters:

audiences
string|array<string>

The specific audience(s) to check for.

For example, "new-user", "returning-user", "customer", etc.

quantifier(optional)

A quantifier to specify how many times the event must have occurred.

window(optional)

The time window during which the event must have occurred.

Event properties

This event does not have additional properties.

Examples

You can check whether a user has matched a specific audience:

user has matched audience "new-user"

Or check if they have not matched that audience:

user has not matched audience in "new-user"

You can also check if the user has matched at least one of the specified audiences:

user has matched audiences ["new-user", "returning-user", "customer"]

Or check whether the user matched an audience at least twice:

user has matched audience "new-user" at least 2 times

You can even filter by time, such as checking if the audience match was recorded yesterday:

user has matched audience "new-user" yesterday

Combine counts and time windows in one expression:

user has matched audience "new-user" exactly 2 times last week