The User Sessions chart helps you analyze your users through various sessions-based metrics. Sessions are recorded in the following three ways:
- Server-side: Sessions can be tracked server-side using the HTTP API by including a value in the session_id field. The session_id is the number of milliseconds since epoch, counting from the start of the session.
- Client-side (mobile): By default, using our mobile SDKs, events triggered within 5 minutes of each other are counted towards the current session (the same Session ID). The time of the first event marks the start time of a session and the last event triggered marks the end time of a session. For example, the first event could be marked by an 'Open App' event. In addition, events that are sent within five minutes of each other are counted towards the current session (the same Session ID).
Table of Contents
Note: You will not see any data in this chart if you are not sending a Session ID with your events. Our SDKs will track this automatically for you unless you flag an event as out-of-session (Session ID = -1) but if you are using our HTTP API, then you will have to send a session_id with your events.
User Sessions Metrics
The User Sessions chart can display three different views on sessions information. To select which metric you want to view, use the "..measured by" dropdown menu in the left panel of the chart control panel.
The metrics you can measure are:
- Session Length Distribution: Shows the distribution of session lengths in a histogram.
- Average Session Length: Graphs the average session length, which is calculated by the sum of all session lengths within the interval divided by the total number of sessions in that interval.
- Average Sessions Per User: Graphs the average number of sessions per user, which is calculated by the total number of sessions within the interval divided by the total number of active users in that interval.
Chart Control Panel
The left module is used to select the particular session metric you want to see in your chart. The right module in the control panel functions analogous to the right module in an Event Segmentation chart. You can read more about how to compare user segments here.
You can set up and interpret any User Sessions chart easily as the UI allows you to read the parameters like a sentence. For example, the following chart shows you the average session length for all your users grouped by country daily for the last seven days.
You can use the date picker to choose a more specific time range to analyze your data and can switch between "Last", "Between", and "Since".
Additionally, you have the option to view data in daily, weekly, or monthly units by toggling between the different options in the dropdown menu next to the date picker. If you are looking at multiple segments in your chart, you can manually select and deselect each segment by hovering over the segment name in the bar below the chart and removing it or by clicking the "+" button to add it back. Finally, you can click on any data point in the chart to inspect the users that make up that data point by using Microscope.
Breakdown Data Table
Underneath the chart is a data table of sessions data. The below image is an example data table of the average session length per day segmented with the "+Group By" function. You can select or deselect which segments you see in the graph by clicking on the segment name in the data table. Furthermore, the data table can display some simple calculations for you.
Lastly, you can download the data table by clicking the "Export CSV" button.