Many of UserReplay’s customers utilize the ability to integrate a session replay link to solutions outside of UserReplay. These solutions are varied and can include online surveys, chat, user initiated feedback, or web analytics. It is very valuable to be able to integrate a session replay solutions with UserReplay for the following reasons:
Put context around the feedback users are giving you by being able to replay that specific customer’s experience. e.g. If a customer gives you poor feedback scores or comments such as “your site sucks”, it is useful to know really what happened to that customer on their journey.
Shadow browse during support calls/chats.
Direct link from analytics segments to a session replay.
The following approach is agnostic of particular vendor but UserReplay already has proven integrations with a number of vendors – including Google Analytics, OpinionLab, iPerceptions and Rant&Rave. Additionally, you can build your own custom integration by building a parameterized URL.
UserReplay has the ability to generate a parameterized Session Replay link for every visitor to your application, the Session Replay link is then placed into the websites data layer. Once the link is generated, other applications such as Google Analytics can then access it to provide the ability to link directly from a segment, or individual user, directly into a replay of that user journey.
An example of the configured code is below:
There are two items to configure when deploying the Session Replay integration:
1. Base URL – This is provided by UserReplay and is the main URL for securely accessing your system.
2. Data layer key to set – This is the key where the data layer variable will be set for each user, the default is dataLayer.userReplayLink but this can be adjusted to suit the solution you are integrating with and the vendor will be able to advise if any changes are required to pick up the Session Replay link.
Once deployed, you can test the integration by examining your applications data layer.
From any page of the application, open up Developer Tools and navigate to the console window. Enter the text dataLayer and hit return. You should then see the Session Replay link in the data layer:
Additionally, you can build your own integration to Session Replay by configuring a parameterized search URL around your UserReplay Base Link (provided by UserReplay).
To build the parameterized Session Replay link you will need to capture the UserReplay Session ID (Set in cookies and Local storage) as well as the current date.
The URL can then be built using the following format:
BASEURL as supplied by UserReplay
DATE in the format yyyy-mm-dd
URSESSION is the urCapture Session ID from local storage or cookie
An example of which is below:
Multiple Tenant Support
If you are monitoring multiple applications with UserReplay there is an additional parameter required in the query string so the search knows which tenant to search against.
This can also be configured in the JS itself by configuring the host names to set the security tenant variable as per below;
// Check for the project ID
// Production Sites:
securityTenant = 'prod';
// Staging Sites:
securityTenant = 'stage';
// Default any uncaught traffic goes to prod project
securityTenant = 'prod';
To build the parameterized Session Replay link you will need to insert the security_tenant variable to the BASEURL then complete the integration as in the above Custom Integration section.
BASEURL and security_tenant as supplied by UserReplay
An example BASEURL including ‘default’ Security Tenant is below: