A user session, also known as a "visit," "journey," or "clickpath," is a sequence of user actions that are performed by the same user in your application during a limited period of time. A single session typically includes multiple page or view loads, third-party content requests, service requests, and user actions such as clicks or taps. Each user session includes at least one user action.
To view user session data, go to Session Segmentation. For more details, see New: User session analysis.
User session identification
For web applications, Dynatrace can show you all the sessions of an individual user, even when those sessions are anonymous or when a user tag has been changed or gone missing. User identification is achieved by storing a persistent cookie within each user's browser. This cookie contains a unique identifier for the user, which is marked as the Internal user ID in the Dynatrace web UI. Cookies enable Dynatrace to assign even anonymous user sessions to known users. As long as a user has logged into your application at least once, you can search for and identify that user, even when the user accesses the application in anonymous, unauthenticated sessions. This is particularly useful for analyzing periods of time when a user might not have been able to log into your application because of issues with your authentication service. Note that if a user disables persistent cookies or clears their cookies, the unique identifier is regenerated.
For mobile applications, user identification is achieved by generating and storing a unique identifier when a user launches an application for the first time. This identifier, marked as the Internal user ID in the Dynatrace web UI, is regenerated when the user changes their privacy settings. It's only possible to view all sessions of a particular user when the data collection level is set to User behavior; when the data collection level is set to Off or Performance, the unique identifier is regenerated for every session, making it impossible to list several sessions of a particular user.
User action grouping
Dynatrace stores some information in session cookies and local storage. This enables the correlation of user actions into one user session. However, this session information is erased when the browser is closed, the user clears their browser cookies, or the user cleans up their local storage. In such cases, the next initiated user action starts a new user session.
Suppose, for example, that a user of a web application performs 10 user actions every 1–2 minutes and after each user action the user either closes their browser or deletes their browser cookies. In such a situation, 10 user sessions would appear on the User sessions page, each composed of a single user action.
Consider another example. A user session is initiated, but after a few minutes the user walks away and leaves their browser window open. After a 45-minute break, the user returns back, and a new user session starts because the browser has been inactive for more than 35 minutes.
User session timings
A user session starts when the first user action is initiated.
A user session ends in one of the following ways:
Once a user session has about 200 user actions, a new session is created and all subsequent user actions are included in the new user session. There is no extra charge for additional user sessions that Dynatrace creates following such session splits.
User session duration is the elapsed time between the initiation of the first user action in a session and the completion of the last user action in the session. Note that timeout periods—periods that include no user activity—aren't factored into user session duration measurements.
Typically, a user session appears in the Dynatrace web UI within 4 minutes. However, this could sometimes exceed 10.5 minutes.
Live vs. completed user sessions
Live user sessions don't have any information about the user experience score or duration as those metrics are calculated at the end of the session. Live sessions can still get new user actions.
Use the Live filter to separate out live user sessions from completed sessions.
Live vs. active users
- A live user is a user who was active once before, but whose session has not yet been ended.
- An active user is a user who has been confirmed still active at a given time.
To make the difference tangible, let's look at an example. A user performs their latest action at 8:00 and is then idle. At 8:15, we would still count this user as a live user because their session has not yet timed out, but we wouldn't count this user as an active user from 8:01 to 8:15.
As a rule of thumb, the number of "live user" sessions should be greater than the number of "active user" sessions because the former can include sessions that started even before the start of the selected time frame and might go beyond the end of the selected timeframe. Or, to put it differently, the former is a count that might span beyond the selected timeframe, while the latter is a point-in-time metric and does not span beyond the selected timeframe. Therefore, comparing these two numbers does not really make sense.