Skip to main content
Segmentation is the process of grouping users who share common properties or behavior patterns. A segment can be based on user attributes, events, event attributes, or a combination of all three. With MoEngage Segmentation, you can build audiences such as users in a specific city, users who made a purchase in the last 30 days, or users whose last session was more than 7 days ago. These segments can be used to send personalized campaigns or to analyze behavioral trends.

What Data Does MoEngage Use?

Segments are built from two primary types of data that MoEngage stores about your users:
  • User Attributes — properties that describe who a user is
  • Events and Event Attributes — records of what a user has done
PrerequisitesBefore you start with segmentation, ensure that user properties and/or events and event properties are present in MoEngage. To set up your data flow, refer to the MoEngage Developer and API documentation.
Understanding these data types helps you decide which segment type and filters to use. For a complete overview of how MoEngage stores and organizes data, refer to Overview of Data in MoEngage.

User Attributes

User attributes are properties of a user in MoEngage, such as email, name, city, subscription status, or any custom property your app tracks. Attribute values are updated in near-real time and always reflect the latest known value — MoEngage does not store historical values for user attributes. Examples of segments based on user attributes:
  • Users whose last known country is India
  • Users who have unsubscribed from email
  • Users where Push iOS Reachability is true
Some user attributes are generated automatically by MoEngage; others are sent by your app or data pipeline. For more information, refer to User Profile and Derived Events and Attributes.

Events and Event Attributes

Events are actions that users perform, such as App Open, Add to Cart, or Product Purchase. Each event can have event attributes — properties specific to that action — such as product category, price, or platform. Unlike user attributes, events are stored historically and can be queried over a time range. Examples of segments based on events:
  • Users who placed an order at least 3 times in the last 90 days with category “sportswear”
  • Users who viewed a page at least 5 times in the last 30 days, with category “laptop”
  • Users who added to cart at least once in the last 30 days, with category “mobiles”
For a complete guide to event tracking, refer to A Complete Guide to Event Tracking.

How Segments Use Your Data

Filters

Filters are conditions applied to user attributes or event attributes to identify matching users. For example, you can filter users from London, or users who purchased shirts in the last 30 days. For a full reference of available filter types and operators, refer to Filters in Segmentation.

Joins

Multiple segment conditions are joined using AND, OR, or Exclude logic:
  • OR — users who match either condition
  • AND — users who match both conditions
  • Exclude — users from one condition minus the overlap with another

Getting Data into MoEngage

Before you can create segments, MoEngage needs data about your users. The most common ways to send data are:
  • SDK integration — mobile or web SDK sends user attributes and events in real time. Refer to the Developer Guide to get started.
  • API integration — send data programmatically using the MoEngage Data API.
You do not need an SDK or API integration to start creating segments. If your user data is in a file or a data warehouse, you can use File Segments (upload a CSV list) or Warehouse Segments (connect directly to BigQuery, Snowflake, or Redshift) to build an audience immediately.