User sessions

A user session, sometimes known as a "visit," is a group of user actions that are performed in your web application during a limited period of time. A single session typically includes multiple page loads, 3rd-party content requests, service requests, and user actions (for example, button clicks and file downloads). Each user session includes at least one user action.

Live user sessions are differentiated from ended user sessions by color, thereby allowing you to spot active sessions at a glance. live user sessions

To view user session data, go to Session segmentation in the Dynatrace menu.

Dynatrace typically shows all the sessions of each individual user, even when those sessions are anonymous (non-authenticated users identified via browser cookies) or when a user tag has been edited or deleted. For mobile apps, Dynatrace identifies individual users based on the specific mobile device they use. For web applications, user identification is achieved by storing a persistent cookie within each user’s browser. 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 your application within anonymous, unauthenticated sessions. This is particularly useful for analyzing periods of time when a user may not have been able to log into your application due to an issue with your authentication service.

Extended users

In Dynatrace there are two ways to identify a user, either through the device identifier or through the user tag. Extended users covers use cases where multiple users/user tags share one device. Dynatrace creates segments of the clusters where the same user tags or device identifiers meet in different combinations. You can turn on these segments comprising different combinations when looking at a user on the User details page.

extended-users

  • When you enable Extended users, all information on the User details page extends to cover all different combinations of the initial user and the user's relations to other devices and/or user tags.

  • When you disable Extended users, information displayed on the User details page consists exclusively of the data from the specific user tag and the devices used by that user tag. If there's no user tag, then the device identifier is used, and only for that particular device. For details on how to configure user tagging, see Identify individual users for session analysis).

When does a user session start?

A user session starts when the first user action is initiated.

When does a user session end?

A user session ends in one of the following ways:

  • After 30 minutes of browser inactivity.
  • When the user closes their browser. Note that the session only ends when the browser is closed and remains live in the UI until 30 minutes of inactivity.
  • Once the limit of 200 user actions per session is reached.
  • By calling the JavaScript API function dtrum.endSession(). This function can be used within your application to end user sessions automatically when, for example, the user logs out. You can also use this API call if, during testing for example, you want to immediately end browser sessions. To use this function, open your browser's console and enter the call dtrum.endSession(). Your user session will then appear in the User sessions view 2-4 minutes after the end of the session.
  • Maximum session duration is 6 hours.

Typically, a user session is visible in the search within 4 minutes. However, this could sometimes exceed to 10.5 minutes.

How are user actions grouped into user sessions?

Dynatrace stores some information in session cookies and local storage. This enables the correlation of user actions into one user session. This session information is erased however when (1) the browser is closed, (2) the user clears their browser cookies, or (3) 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 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 in User sessions view, each comprised 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. If the user were to close their browser before taking their break, a new user session will start when the user returns to the application, regardless of how long they were away from their computer.

How is user session duration calculated?

User session duration is the elapsed time between initiation of the first user action in a session and the completion of the last user action in the session.

Note: Timeout periods (which include no user activity) aren't factored into user session duration measurements.

How to differentiate live user sessions from completed sessions

Live user sessions are colored light purple and don't have any information about the user experience score or duration, as those are calculated at the end of the session. Live sessions can still get new user actions.

live-ses

The Live filter can be used to separate out live user sessions from completed sessions.

live filter

What's the difference between live and active sessions?

  • A live user is a user who was active once before but whose session has not yet been ended (completed). View details about when a session is considered 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 in the timeslots from 8:01 to 8:15.

As rule of thumb, session counts for live users should usually be higher than session counts for active users, 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 them does not really make sense.

Can you analyze a single web session across different domains?

No, for technical and security reasons.

Suppose your user visits two completely different domains during a single "session". How would Dynatrace capture this, given that both domains are instrumented with Dynatrace RUM?

You'd actually see two separate user sessions:

  1. The first session starts with the page load for the web page of the first domain, and it ends when you click a link that leads you to a web page with a different domain (the second domain).
  2. The second session starts with the first page load on the second domain, and it ends when any of the criteria for ending a user session is met.

Why this happens:

  • Technical: cookies can't be shared across domains (except for subdomains)
  • Security: it's a security feature of browsers and a limitation that all vendors share

Real-time analysis

  • Live user sessions are directly accessible through the Live user activity tile on the dashboard.

live user activity

  • Problem pages can be clicked to easily access the related Business impact analysis.

business impact analysis

  • Impacted users can also be directly accessed from the problem pages.

impacted users

  • Bounces and conversions are available for completed user sessions.

bounce and conversion