Aggregations

Last updated:

|Edit this page

There are numerous ways to aggregate events and properties in trends, so you can go beyond just tracking the total number of events.

Aggregations enable you to answer questions like:

  • What is the average session duration of users on my site?
  • How many unique users have used a feature within the last month?
  • What is the 95th percentile in time spent loading?
  • How often do users perform a specific event or action?
  • How do power users and a non-power users behave?
Aggregation options

Event aggregation

Event aggregation determines how the number of events within a certain period are formatted and calculated. In this case, the aggregation is done based on how events are grouped, so if events are grouped by 'Day', then all events on a given day are aggregated based on the chosen method.

Event aggregationDescription
Total countThe total number of times this event was performed in a given period.
Count per userThe total number of times a per users performs this event, broken down by Average, Minimum, Maximum, Median, or 90th/99th/99th percentile.
Unique usersThe total number of unique users who have performed this event in a given period. Example: If the same user performs an event twice, this will only count it as 1.
Weekly active users (WAU)The total number of unique users who have performed this event within the last 7 days. This is a rolling count for each period, counting the previous 7 days.
Monthly active users (MAU)The total number of unique users who have performed this event within the last 30 days. This is a rolling count for each period, counting the previous 30 days.
Unique sessionsThe total number of unique sessions within the given period where this event was performed.
Unique groupsThe total number of unique groups that performed these events within a period. See our group analytics docs for more.

Property value aggregation

Property aggregation enables you to combine and plot the values of a property. Property aggregation only works on properties with numerical values.

Property aggregationDescription
AverageThe average value of a property
SumThe sum of values of a property
MinimumThe minimum value of a property
MaximumThe maximum value of a property
MedianThe median of the distribution of property values
90th percentileThe 90th percentile of the distribution of values (90% of events have a property value less than this)
95th percentileThe 95th percentile of the distribution of values (95% of events have a property value less than this)
99th percentileThe 99th percentile of the distribution of values (99% of events have a property value less than this)

HogQL expressions

You can also create your own aggregation using HogQL. This enables you to use SQL operators and functions to customize how data is formatted and calculated. For an example, see our tutorial on the power of HogQL’s sum() aggregation.

Questions?

Was this page useful?

Next article

Breakdowns

You can use breakdowns to split up trends insights by the values of a specific property, such as by Current URL , Country , or email , or a cohort of users – pretty much anything you can imagine, really. To add a breakdown, click on '+ Add breakdown' in the group filters section and search for your desired property. The supported properties are: Name Description Event properties Properties specific to a tracked event (e.g. Current URL ) Session properties Properties specific to a single…

Read next article