Interest shown

Learn how to check if a user has shown interest in a specific topic.

This expression checks if a user has shown interest in one or more topics based on Interest shown events.

Syntax

The basic syntax for this expression is:

user has shown interest in /*<interests>*/
Try in Playground

The negation of the expression can be expressed as:

user has not shown interest in /*<interests>*/
Try in Playground

You can also use determiners to check for multiple interests:

user has shown interest in /*<determiner>*/ /*<interests>*/
Try in Playground

These are the supported determiners:

PredicateDescription
all ofInterest in all specified topics.
eitherInterest in at least one of the specified topics.
none ofInterest in none of the specified topics (opposite of all).
neitherInterest in none of the specified topics (opposite of either).

You can refine the expression with quantifiers and time windows:

user has shown interest in /*<interests>*/ /*<quantifier>*/ /*<window>*/
Try in Playground

Parameters

These are the supported parameters:

interests
string|array<string>

The specific topic(s) of interest to check for.

For example, "ab testing", "analytics", "data science", 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 shown interest in a specific topic:

user has shown interest in "personalization"
Try in Playground

Or check if they have not shown interest in that topic:

user has not shown interest in "personalization"
Try in Playground

You can also check for multiple topics using a list:

user has shown interest in ["personalization", "analytics", "data science"]
Try in Playground

Or require interest in all listed topics:

user has shown interest in all of ["personalization", "analytics", "data science"]
Try in Playground

Or check whether the user showed interest in a topic at least twice:

user has shown interest in "personalization" at least 2 times
Try in Playground

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

user has shown interest in "personalization" yesterday
Try in Playground

Combine counts and time windows in one expression:

user has shown interest in "personalization" exactly 2 times last week
Try in Playground