Skip to content

Build segments by events

Event-based segmentation allows you to target users based on their actual behavior and actions within your app or website. This creates highly personalized and effective campaigns by focusing on user engagement patterns.

Build segments by events

Anchor link to

To build a segment by events:

  1. Hit Event in the Add filter by section.

Interface showing the Add filter by section with Event option highlighted

  1. Select an event from the drop-down list.

Drop-down list displaying available events for segment filtering

  1. Indicate conditions for the selected event: the number of times it happened and a time frame.

When specifying a time frame for your segment, you can choose from two categories: Relative dates and Specific dates.

Relative dates
Anchor link to

Use these options for dynamically updating time windows based on the current date:

during the last N daysIncludes events that occurred within the past N days
exactly N days agoTargets users who triggered the event exactly N days ago
N or more days agoIncludes users who triggered the event at least N days ago
between N and M days agoDefines a range of days before today
between N and M days aheadDefines a range from N to M days from today, where 0 means today. Both N and M are included
Example of configuring segment filters by event occurrence and relative date criteria
Specific dates
Anchor link to

Use these options to define fixed calendar-based filters:

on a specific dateIncludes users who triggered the event on a selected calendar date
on or after a specific dateIncludes users who triggered the event starting from the selected date onward
on or before a specific dateIncludes users who triggered the event up to and including the selected date
between datesIncludes users who triggered the event between two specific calendar dates
Interface for segmenting users by event occurrence and specifying the event time frame criteria
  1. (Optional) Click + Attribute to narrow the condition down to a specific event attribute. Select the attribute from the dropdown, choose an operator, and specify a value. Start typing to search suggested values based on previously recorded data.
Event attribute condition showing attribute name, operator, and value with autocomplete suggestions

See event attribute operators by type for the full list of available operators.

  1. (Optional) Click + Sum when you need a total across matching events (for example, total spend), not a limit on a single event.

Choose an integer or decimal (price) attribute, an operator, and a threshold. + Sum appears only when the event has at least one integer or decimal (price) attribute. See operators for sums.

Example: Purchase at least once during the last 90 days, with sum of amount greater or equals 100, targets users who spent 100 or more in that window, in one purchase or several.

Purchase exactly or more 1 time in the last 90 days, with highlighted sum of amount greater or equals 100

Attribute filters on the same event still apply: the sum uses only events that match them (for example, total amount where category is "shoes"). You can add more than one sum, on the same or different attributes. A user must pass every sum you add.

  1. If you set several events as a segment condition, select an operator you’d like to use (AND/OR).
  1. Below the filter groups, enable Include all of a user’s devices to target a user across all their devices, not just the one that matched the segment condition. This ensures they receive your messages on every platform they use.

If any of a user’s devices matches the conditions, all their devices are added to the segment. If the checkbox is left unchecked, only matching devices are included.

This same checkbox appears, disabled, on a segment’s read-only detail page — it reflects the setting the segment was created with and can’t be changed there.

Include all of a user's devices checkbox for cross-platform targeting

Event attribute operators by type

Anchor link to

The available operators depend on the type of the event attribute you’re filtering by. Select a type below to see its operators.

Operator
Description
Example
isAttribute value equals the specified valuebutton_name is "checkout"
is notAttribute value does not equal the specified valueurl is not "/cart"
starts withAttribute value begins with the specified stringurl starts with "https://example.com"
ends withAttribute value ends with the specified stringurl ends with ".html"
containsAttribute value contains the specified stringurl contains "/products/"
inAttribute value matches any value in a provided listbutton_name in ["submit", "cancel"]
not inAttribute value does not match any value in a provided listcategory not in ["spam", "test"]
not setNo value was recorded for the attributecoupon_code not set
anyAttribute has any recorded valuereferrer any

Operators for sums

Anchor link to

A sum condition compares the total of an attribute across the matched events, so it supports fewer operators than an attribute condition.

Operator
Description
Example
isThe total equals the specified numbertotal_price is 100
is notThe total does not equal the specified numbertotal_price is not 0
greater or equalsThe total is greater than or equal to the specified numbertotal_price greater or equals 100
less or equalsThe total is less than or equal to the specified numbertotal_price less or equals 500
betweenThe total is within the specified range (inclusive)total_price between 100 and 500

Event-based segmentation examples

Anchor link to

Below are several practical scenarios illustrating how you can use event filters to create meaningful audience segments.

Frequent purchasers
Anchor link to

Goal: Target highly engaged users who have made multiple purchases recently.

How to set up:

  • Event: Purchase_made
  • Condition: exactly or more
  • Times: 3
  • Time frame: during the last N days
  • Time frame value: 30

Use case: Send special offers or loyalty rewards to users who demonstrate frequent buying activity.

High-value single purchase
Anchor link to

Goal: Target users who made a large purchase, regardless of how often they buy.

How to set up:

  • Event: Purchase_made
  • Condition: exactly or more
  • Times: 1
  • Time frame: during the last N days
  • Time frame value: 30
  • Attribute: total_price
  • Operator: greater or equals
  • Attribute value: 50

Use case: Invite big spenders to a loyalty or VIP program right after a qualifying purchase.

Total spend over a period
Anchor link to

Goal: Target users whose combined purchases reach a spending threshold, even if no single purchase does.

How to set up:

  • Event: Purchase_made
  • Condition: exactly or more
  • Times: 1
  • Time frame: during the last N days
  • Time frame value: 90
  • Sum: total_price
  • Operator: greater or equals
  • Sum value: 200

Use case: Move customers into a higher loyalty tier once their spending over the last 90 days reaches the threshold.

Refunds exceed purchases
Anchor link to

Goal: Target users who got back more than they spent over a period. This works when refunds are tracked with the same event and a negative amount.

How to set up:

  • Event: Purchase_made
  • Condition: exactly or more
  • Times: 1
  • Time frame: during the last N days
  • Time frame value: 90
  • Sum: total_price
  • Operator: less or equals
  • Sum value: -1

Use case: Route these users to a support or win-back flow instead of promotional campaigns.

Viewed products but no purchase
Anchor link to

Goal: Identify users who have shown interest but have not converted.

How to set up:

  • Event 1: Product_Viewed
    • Condition: exactly or more
    • Times: 1
    • Time frame: during the last N days
    • Time frame value: 7
  • Event 2: Purchase_made
    • Condition: never
    • Time frame: during the last N days
    • Time frame value: 7
  • Operator: AND

Use case: Send reminders, special offers, or personalized messages to users who browsed products but haven’t made a purchase yet.

Users engaged during a campaign
Anchor link to

Goal: Target users who participated during a specific promotional period.

How to set up:

  • Event: Promotion_Click
  • Condition: exactly or more
  • Times: 1
  • Time frame: between dates
  • Time frame value: "2024-01-01" and "2024-01-31"

Use case: Follow up with users who interacted with a past campaign to promote a related offer or gather feedback.

High-value actions over time
Anchor link to

Goal: Identify users who performed a valuable event a certain number of times within a custom date range.

How to set up:

  • Event: Subscription_Renewal
  • Condition: exactly or more
  • Times: 2
  • Time frame: between dates
  • Time frame value: "2024-01-01" and "2024-12-31"

Use case: Offer special recognition or advanced features to loyal subscribers who regularly renew their subscriptions.

Tips for event-based segmentation

Anchor link to
  • Use relative dates for ongoing campaigns that should stay updated with current user activity.
  • Narrow an event condition down with an event attribute filter (e.g., purchase amount, product category) instead of relying on event occurrence alone.
  • Combine event filters with other criteria such as tags (e.g., user demographics, subscription status) or existing segments for more precise targeting. For example, you can filter users based on both event occurrence and user properties stored in tags to tailor your messaging even further.
  • Periodically review and update your segment filters to adapt to changing user behaviors or business goals.