Header background

How to get the most value out of Session Replay: Use cases and examples

At Dynatrace, we’re constantly striving to come up with solutions that can help modernize your performance and user experience monitoring strategies. Session Replay is one such feature, allowing you to capture and visually replay your users’ experiences with your application, just like you’re watching a movie.

Session Replay can significantly improve the way your team performs tasks such as:

  • Resolving customer complaints by watching visual replays so that you know exactly what went wrong during a session
  • Detecting usability issues by observing various replays and identifying patterns
  • Filtering out the sessions of premium customers so that they receive enhanced support

User session replay

Fine-tune Session Replay for your business purposes—examples

Session Replay features a number of settings, controls, and API calls that allow you to selectively record only those user sessions that are relevant to your business case:

  • The Cost and traffic control setting, which allows you to decide the percentage of sessions you want to record
  • The Session Replay opt-in mode, which can be used to decide if user sessions should be recorded end to end by default or only when certain opt-in conditions are met
  • The Session Replay API, which consists of two methods: enableSessionReplay() and disableSessionReplay()

By combining these settings, you can record sessions that serve a variety of business cases. The table below shows the unique combination of settings that can be used for each use case. However, before you apply them, ensure that you’ve enabled Session Replay.

The sections that follow discuss each use case in detail.

Use case Cost and traffic control Session Replay opt-in API call
Resolve customer complaints 100% Disabled
Detect usability issues 25% Disabled
Support premium customers 100% Enabled dtrum.enableSessionReplay()
Detect usability issues + Support premium customers  25% Disabled dtrum.enableSessionReplay(true)
Capture only a percentage of those user sessions that follow a set path 25% Enabled dtrum.enableSessionReplay(false)
Exclude pages with sensitive information  25% Disabled dtrum.enableSessionReplay(false)

Resolve customer complaints

One of the most common use cases of Session Replay is to provide resolutions for user complaints. To make this a viable option, you’re required to record 100% of all user sessions. This ensures that you have complete sessions recorded end to end so that you can use to provide support to your customers.

The following settings can be applied:

  • Cost and traffic control: 100%
  • Session Replay opt-in mode: Disabled

Detect usability issues

Another common use case is recording random user sessions from end to end to analyze how users interact with your application, perform error analysis, investigate causes for rage clicks, and so on. In these cases, you could record only a certain percentage of sessions from end to end. The percentage of recorded sessions should be decided upon based on the total number of visits to your website. On average, 10,000 sessions per day in your application should be recorded. Using this number, Session Replay covers all possible combinations of resolutions, browser types, regularly occurring errors, and sessions impacted by problems.

The following settings can be applied:

  • Cost and traffic control: 25%
  • Session Replay opt-in mode: Disabled

With this configuration, one out of every four user sessions is recorded. In this case, there’s no need to make Session Replay API calls from your application. 

Support premium customers

Consider that you want to record sessions from only premium users so that you can provide them with enhanced support. Or, you might want to see how users use your application so that you can improve certain paths or detect usability issues in those paths.

In such cases, you’ll want to record only those sessions that match the required conditions. For example, you could begin recording a session only after you’ve confirmed that the user is indeed a premium customer. Here, 100% of such sessions are recorded by Session Replay.

The following settings can be applied:

  • Cost and traffic control: 100%
  • Session Replay opt-in mode: Enabled

In this example, your application makes the following Session Replay API call: 

if(isPremiumUser(user)) { 

    dtrum.enableSessionReplay(); 

} 

With this configuration, whenever a premium customer logs in to your application, the session is recorded.

Detect usability issues and resolve complaints from a select group of customers

It’s often necessary to implement two different use cases at once: record random sessions end to end as well as sessions from premium users. This type of configuration is also an excellent example for understanding how the newly added ignoreCostControl parameter works. This parameter is used to record user sessions without consideration of the Cost and traffic control setting. 

In this case, Session Replay records two types of sessions: 100% of sessions from premium users as well as 25% of sessions from other users.

The following settings can be applied:

  • Cost and traffic control: 25%
  • Session Replay opt-in mode: Disabled

Your application makes the following Session Replay API call: 

if(isPremiumUser(user)) { 

     dtrum.enableSessionReplay(true); 

} 

With this configuration, the ignoreCostControl=true parameter tells the enableSessionReplay() method to ignore the Cost and traffic control setting and to record each session.

Detect usability issues in a specific path of your application

If you wish to detect usability issues in a specific path in your application that receives close to a million visits, you wouldn’t want to record all of the sessions. Instead, you can use Session Replay to record only a percentage of such sessions.

In such a use case, 25% of only those sessions that come from premium users can be recorded by Session Replay.

Alternatively, you may want to record only a percentage of sessions from premium users that meet a specified set of conditions. An example of this could be sessions from premium users who have more than three items in their cart.

In both cases, the following settings can be applied:

  • Cost and traffic control: 25%
  • Session Replay opt-in mode: Enabled 

Your application makes the following call:   

if(isPremiumUser(user) && itemsInCart>3) { 

     dtrum.enableSessionReplay(false); 

 

With this configuration, one in four of only those sessions that meet the specified conditions is recorded. 

Exclude pages with sensitive information

You may want to record a percentage of user sessions while excluding pages that contain sensitive information. An example of this could be a registration page that contains a user’s personal information. Such a page shouldn’t be recorded if your organization is GDPR compliant.

For such cases, the following settings can be applied:

  • Cost and traffic control: 25%
  • Session Replay opt-in mode: Disabled

Your application will make the following API call on pages that contain sensitive information: 

dtrum.disableSessionReplay(); 

For all other pages, it makes this call: 

dtrum.enableSessionReplay(false); 

Summary

The following tables summarize the behavior of all combinations of settings and the corresponding results: 

  • When Session Replay opt-in mode has been enabled and ignoreCostControl is false:
Session Replay opt-in mode  true  By default, no recording takes place. 
dtrum.enableSessionReplay(false) 

  

 call Evaluate if the session needs to be recorded by considering Cost and traffic control. If yes, start recording. If no, don’t record.  
dtrum.disableSessionReplay()  call  Stop recording. 
dtrum.enableSessionReplay(false) 

  

call  If the session was selected to be recorded in the second row, start recording again. Otherwise, do nothing.
  • When Session Replay opt-in mode has been enabled and ignoreCostControl is true:
Session Replay opt-in mode  true  By default, no recording takes place. 
dtrum.enableSessionReplay(true) 

  

call  Start recording.
dtrum.disableSessionReplay()  call  Stop recording.
  • When Session Replay opt-in mode has been disabled and dtrum.disableSessionReplay is called:
Session Replay opt-in mode  false  By default, sessions will be recorded taking into consideration Cost and traffic control. 
dtrum.disableSessionReplay() 

  

call  Stops recording. 
dtrum.enableSessionReplay(false)   call If the session was selected to be recorded in the first row, continue recording it. If not, don’t do anything.  
dtrum.enableSessionReplay(true) 

  

 call Record even if the session was excluded from recording in the first row. 

Do you want to see Session Replay in action?

Then start your free trial. Within five minutes you can try all the shown use cases by yourself.