Click interceptor

Click interceptor can obscure sensitive data from recorded click events.

Click events can be completely omitted by returning false from the interceptor.

Example click interceptor

{
  interceptors: {
    click: (data, context) => {
      if (data.url.includes('/profile')) {
        // do not record any clicks from `/profile` page
        return false;
      }
      
      if (data.context?.target?.id === 'sensitive-element') {
        // Do not record click on #sensitive-element
        return false;
      }
    }
}

Parameters

dataobject
data.urlstringURL of the page where the click happened
data.propsRecord<string, string> | undefinedClick properties recorded on the clicked element
data.textstring | undefinedClicked text
contextMouseEventMouseEvent