How to block recording of certain elements of the page HTML

There may be elements of the page HTML that you wish to completely exclude from recordings.

For example, a live chat solution may not allow you to add “sessioncamexclude” to the individual messages.

Remove these elements by adding the line of JavaScript that appears below to your page. Do this before the main SessionCam tag is run.

if (!window.sessioncamConfiguration){
 window.sessioncamConfiguration = new Object();
}
window.sessioncamConfiguration.elementsToRemove =

 

Add the elements using their class or id selector first, as per the example below:

if (!window.sessioncamConfiguration){
 window.sessioncamConfiguration = new Object();
}
window.sessioncamConfiguration.elementsToRemove=".lpChat"

 

The above could be used to ignore the HTML that is seen on the first page load, or in subsequent events where there is an element with a class called lpChat.

Finally, the example below could be used to ignore the HTML that’s seen on the first page load, or in subsequent events where there is an element with an id of “secretdynamicarea”.

 

if (!window.sessioncamConfiguration){
 window.sessioncamConfiguration = new Object();
}
window.sessioncamConfiguration.elementsToRemove="#secretdynamicarea"

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.