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
data | object | |
---|---|---|
data.url | string | URL of the page where the click happened |
data.props | Record<string, string> | undefined | Click properties recorded on the clicked element |
data.text | string | undefined | Clicked text |
context | MouseEvent | MouseEvent |
Updated over 1 year ago