Session metrics are useful for understanding your users’ engagement with your app. In terms of Swrve KPIs, there are three related metrics that you can examine:
- Session Count
- Avg Session Length
- Avg Time in App per Day
Viewing session data
A session-based Trend Report provides you with graphs depicting session count, session length, and average time in app data.
The following example shows the Avg Session Length, Session Count, and Avg Time in App per Day KPIs on a sample Trend Report.
Understanding session data
The following is a summary of Swrve’s session data metrics:
- Session count is the count of the number of sessions started on a given day.
- Average session length is the average length of all sessions which were started on a given day. This is calculated by summing the playtime for the user over the course of a day and dividing it by the number of sessions for that day.
- Average time in app per day is the average time spent in the app on a given day. This is calculated by summing the average time spent in app for the user over the course of a day and dividing it by the number of unique users for that day (DAU).
Sessions that span two days are counted against the day on which the session started.
At first glance the average session length and average time in app per day KPIs might sound alike, but they are subtly different. Average time in app per day is calculated by taking the amount of times that all your app users have spent in the app for a given day and dividing this number by the number of daily unique users (DAU) for this day. So this number reveals the average amount of time that each user has spent in an app for a given day. Average session length takes the amount of time that all your users have spent in the app for a given day and divides this by the number of sessions that were started on that day. So this number reveals the average length of a session. These numbers help you understand how your users engage with your app. Average time in app per day tells you how much time a user spends in your app on a daily basis. Average session length complements this information by telling you whether, for example, users prefer a single long session every day or multiple shorter sessions spread throughout the day.
Session length calculation detail
A session begins when Swrve receives a session_start event. You can specify a session to represent the interactive portion of your app (that is, the user presses start and the session calculates until the user reaches the end of the action), or the user’s entire experience on your application (that is, from the moment they open an app until it is closed).
While a session_start event begins a session, there are three ways a session may end:
- session_end event – a session_end event ends a session once it’s received. The session time is calculated as: session_end timestamp – session_start timestamp.
- Timeout – a session times out after 60 minutes of inactivity (no events being received from a user). The session time is calculated as: Last event timestamp – session_start timestamp. So, the timeout is the amount of time spent before giving up on the user sending any more events.
- session_start event – sending a session_start event multiple times ends the previous session and starts a new one. The session time is calculated as: second session_start timestamp – first session_start timestamp.
Timeout calculation example scenario
Suppose a user:
- Sends session_start at time x.
- Then sends another event (not session_start or session_end) five minutes later.
- Then closes the app.
The session length for that user is recorded as five minutes. If a second user performs the same actions as the first user, but then sends another event (not session_start or session_end) 70 minutes later, their session length is still recorded as five minutes, as the time from their last event to the previous event was more than the timeout.
Batched events considerations
For events sent via the batch API (which is used by the iOS, Android, and Unity SDKs), there are some additional considerations used when calculating session metrics. Additional data from the client (the time that the event happened according to the client) is used for calculating the length of sessions. However, the client timestamp is not used for determining the time at which the session happened. This is because the time on client devices tends to be, in a small number of cases, incorrect (and in many cases can go so far as being wrong by years). For more information, see the Swrve Events API guide.