URL interceptor

URL interceptors can obscure sensitive data from URLs, such as tokens. For URL interceptors, the URL is the URL of the page the user is visiting.

URL events can't be filtered out of the recording.

Example URL interceptor

{
  interceptors: {
    url: (data) => {
      const tokenIndex = data.url.indexOf('tokenId=');
      if (tokenIndex > -1) {
        data.url = data.url.slice(0, tokenIndex) + 'tokenId=[OBSCURED]';
      }
    }
}

Parameters

ParameterTypeDescription
dataobjectContains the URL
data.urlstringURL of the page the user is visiting
contextUndefined

📘

Validation

The URL is undergoing validation via the URL() constructor.