Aggregation Operations

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.

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.

 

INFORMATION

  • Aggregation can be applied over a period of 30 days/4 weeks/ 720 hours/1 month as applicable. These limits can be modified, please connect with your CSMs for the same. 
  • Both Change and Percentage Change can be negative.
  • Previous Period: The previous period is the same length of time immediately before the primary time range. This is the Base Period of the aggregation. Assume now is 5:15 PM 18 May 2022. If the primary period for the 'last 3 days' is: 15 May 2022 - 18 May 2022, then the base period is 12 May 2022 - 14 May 2022. 
  • Date Range: Date range available to aggregate the attribute value across filtered events for a user. The chosen date range is the Base Period of the aggregation.

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. 

Agg use case 1.png

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.

Agg use case 2.gif

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.

ezgif.com-gif-maker (4).gif

Things to Note

  1. Aggregation is available only on numerical attributes as sum, min, max, average, and median are numerical functions. 
  2. Aggregation is available only in the User Behavior Section of Segmentation. 
  3. 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.
  4. The median is the approximate 50th percentile of the selected attribute value.

  5. 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.
  6. 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.

 

Was this article helpful?
0 out of 0 found this helpful