optional

LogRocket records a "video" of your users' sessions by logging diffs in the DOM via MutationObserver.

By default, LogRocket does not record any password fields or DOM trees that contain the _lr-hide class. If you'd like to disable all DOM recordings, you can pass this option to LogRocket.init():

LogRocket.init(YOUR_APP_ID, {
  dom: {
    isEnabled: false,
  },
});

inputSanitizer
optional - boolean

LogRocket will automatically obfuscate all user-input elements like <input> and <select> from session recordings. None of that data will be recorded or sent to LogRocket.

Nodes can be whitelisted with the data-public attribute. This attribute will not affect existing data-private privacy settings.

LogRocket.init(YOUR_APP_ID, {
  dom: {
    inputSanitizer: true,
  },
});

textSanitizer
optional - boolean

LogRocket will automatically obfuscate all text nodes from all session recordings. None of that data will be recorded or sent to LogRocket.

Nodes can be whitelisted with the data-public attribute. This attribute will not affect existing data-private privacy settings.

LogRocket.init(YOUR_APP_ID, {
  dom: {
    textSanitizer: true,
  },
});

baseHref
optional - string

If client accesses your app on a private domain (or from a Cordova app), then LogRocket won't be able to fetch CSS/image assets for playback (see Testing on localhost/VPN for more information). To get around this limitation, you can specify a baseHref from which LogRocket will fetch assets. Make sure that this domain is publicly accessible, and that it contains the same assets as the private domain:

LogRocket.init(YOUR_APP_ID, {
  dom: {
    baseHref: 'https://assets.example.com/',
  },
});