Skip to main content

Knowledge Base

SessionRecording - Optin/Optout button

Last Modified 13 Mar 2024

This usecase describes an example implementation of optin/optout button for Session Recordings.

1. Configuration

In the plugin configuration of the backend, activate the LiveView plugin. We used the following configuration in our example.

ConfigValueDescription

Privacy

Mask user input

We want to mask all user inputs which happen on our page.

Optin

Function

We want the user to click on the "Accept Cookie" button to activate session recordings. 

2. Script Implementation

The JavaScript has to be integrated in each webpage where we want to co-browse.

Learn how to implement the LiveView on your page.

3. Sample code - Optin/Optout button

<script src="https://cdn.chatvisor.com/cdn/js/XXXXXX.js" type="text/javascript" async></script>
<button type="button" id="CV_START" onclick="CV.cobrowse.optin()" >Optin</button>
<button type="button" id="CV_STOP" onclick="CV.cobrowse.optout()" >Optout</button>