I can't figure out how to calculate the Average Session Duration per SESSION (Total Session Time / Total Sessions), not the average duration per USER. For example, it's giving around 7 minutes per multiple sessions a user has had, instead of ~1 minute per session. The Mixpanel UI consistently defaults the metric aggregation to 'Aggregate Property per User' or a 'User Sum' calculation, even when I select 'Average' of the 'Session Duration' property. When I try to use a Formula Metric (A/B), my numerator (Metric A) is being defined as User Sum of Session Duration (as seen in the formula definition) instead of a simple Sum of Session Duration across all events. This results in an incorrect, inflated average.
Note that my goal is to get an avg per session duration similar to what google analytics provides as a default statistic.
A is the total sum of all durations. B is the count of all sessions. C is the duration sum divided by the session count. So that would give you the average duration per session.
You can then hide A & B and only show C, rename it to what you want and put a metric insight view.
Thank you! I think this works, but my avg session time is significantly higher than my google analytics avg session time. ~6 mins vs ~ 1min. Might this be because it is defining session duration differently. What is the default session timeout value in Mixpanel and where can I find it/configure it?
30 minutes does seem reasonable -- and similar to GA -- so I'm not sure that's it.
Could our average session duration (~6 minutes) be inflated compared to Google Analytics (1 minute) due to the inclusion of server-side or system-level events that are stretching the duration between the first and last event, but are not actual user interactions? If so, what event property is the most reliable way to filter a session query to include only client-side, user-driven events (excluding server-side, internal, or bot activity)? Is it $source, $device_type, or another property?
Hi Lloyd- Julianne from Mixpanel Support here! Definitely a lot of great suggestions in the thread. You should be able to use the 'Aggregate Property' to see the average session duration (example in the screenshot below). If you're not able to select that, can you open a ticket directly with Support through our web form? If you don't want server-side events counted toward the session, you can add them as excluded events in the session settings. Excluded events aren't counted when computing sessions. The Sessions doc has more information about that! Inline Attachment: image.png
