Let’s say you successfully ran a campaign offering a 10% discount last month. Now to pamper your high-value, highly loyal customers, you wish to run a campaign offering a larger discount, but only to the customers who responded to your last campaign. For example, you wish to target only those customers whose spending in the last month increased by 20%, compared to the month before. How do you segment this set of customers?
Growth teams require deep segmentation capabilities to effectively target their users. Aggregation enables businesses to add depth to their segmentation queries by leveraging aggregation operators. Here are a few of the use cases that you can execute using aggregation operators -
- Filter users who have spent more than $1000 in the last 30 days
- Filter the user who has purchased the fruit category for more than $200
- Filter the user who increased/decreased their spending by 10% for the fashion category.
- Filter the user who average spent per order increased by 15% with respect to last week.
Aggregation facilitates growth teams to aggregate an event attribute by using operations such as sum, average, min, max, and median. The aggregation operator on an event attribute combined with the numeric filters helps users write sophisticated queries and extract deeper customer segments.
Aggregation Operators
Aggregation Operator | Description |
---|---|
Sum |
Sum of the selected attribute value across filtered events in the selected time range for a user. |
Average |
Average of the selected attribute value across filtered events in the selected time range for a user. |
Minimum |
Minimum of the selected attribute value across filtered events in the selected time range for a user. |
Maximum |
Maximum of the selected attribute value across filtered events in the selected time range for a user. |
Median |
Median of the selected attribute value across filtered events in the selected time range for a user. |
Change |
Absolute change in the aggregated attribute value across filtered events between the selected time ranges for a user. The primary period is the time period associated with the event selected. The base period is the time period associated with the aggregation operator. Change = Aggregated value of Primary Period - Aggregated value of Base Period. |
Percentage Change |
Relative change in the aggregated attribute value across filtered events between the selected time ranges for a user. Percentage Change = (Aggregated value of Primary Period - Aggregated value of Base Period)*100/ Aggregated value of Base Period. |
info |
Information
|
Using Aggregation Operators
Use the + Aggregation button to add the aggregation functionality.
Aggregation with Sum
Segment users who have placed an order at least 2 times in the last 2 weeks with a total purchase amount greater than 1000 dollars.
Change with respect to Date Range
Segment users who have purchased at least 1 once in the last 3 days and the total amount spent increased by at least 1000 dollars with respect to 24 Sep 2022 - 30 Sep 2022.
Percentage Change with respect to Previous Period
Segment users who have purchased at least 3 times in the 30 days and the average amount spent increased by at least 25% compared to the month before.
Things to Note
- Aggregation is available only on numerical attributes as sum, min, max, average, and median are numerical functions.
- Aggregation is available only in the User Behavior Section of Segmentation.
-
Event retention and Aggregation:
- The previous period in aggregation cannot exceed the event retention period.
- Dates available under ‘Date range’ will not exceed the event retention period and the aggregation window.
-
The median is the approximate 50th percentile of the selected attribute value.
- When filtered events are available for a user in the primary period but not the base period, this user is not counted in both Change and Percentage Change. For example, when there is no purchase event for a user in the base period, but it is present in the primary period, this user is not calculated for change and percentage change aggregation.
-
Change and Percentage change are not available for the date filters: Before, After, In the last N hours/weeks/months, last week, this week, last month, and this month.