Time on page

  • 31 August 2020
  • 1 reply


Is it possible to research time spent on page? both sum and average ? 


1 reply

Userlevel 5
Badge +3

@Yael_A —

In Mixpanel you can configure how you want to define a session in project settings > session settings. Sessions include the Session Start and Session End events which are virtual events calculated on Mixpanel's website based upon the session settings.

  • The benefit of virtual events is that you can tweak the session definition without having redo your implementation. 
  • By default, a session is defined as timeout based where a session times out after 30 minutes of inactivity. No events are excluded.
  • In the session settings, you can specify whether a user's Session Start and Session End virtual events are to be calculated based on events (specify a session starting and a session ending event) or time (duration of time passes of inactivity -- no events tracked). If you have an event that does not indicate the user's activity, you can choose to exclude it from the session definition. You can learn more about session tracking in this help article.

The length of the session is recorded on the Session Duration (Seconds) event property of the Session End event. To find the average session duration, you can aggregate the Session Duration (Seconds) event property on the Session End event and set the count as Average. The average Session Duration (seconds) is defined as total aggregated value of Session Duration (seconds) on the Session End event / total count of Session End events within the given time period (last 30 days).

  1. ?name=Screen+Shot+2020-02-25+at+3.18.28+PM.png
  2. ?name=Screen+Shot+2020-02-25+at+3.18.46+PM.png
  3. ?name=Screen+Shot+2020-02-25+at+3.19.03+PM.png

The one caveat for measuring average session duration in this way is that the events that count towards a session is not restricted to events of a certain device type (iOS, Android, Web). It is looking at user's activity across all your platforms, if that can happen, but you can always play around with custom properties to narrow it down to specific platforms. 

I hope this is helpful!