Input interceptor

Input interceptor can obscure sensitive data from recorded input events.

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

Example input interceptor

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

Parameters

dataobject
data.urlstringURL of the page where the input happened
data.valuestringRecorder input value
contextEventEvent