Amplitude-JavaScript icon indicating copy to clipboard operation
Amplitude-JavaScript copied to clipboard

autocapture cssSelectorAllowlist does not exist

Open buckeye44 opened this issue 11 months ago • 1 comments

Hi, installed analystics-browser 2.11.11 into an Angular 16 project via npm. Trying to use the autocapture cssSelectorAllowlist array and receiving error 'cssSelectorAllowlist' does not exist in type 'AutocaptureOptions'.

buckeye44 avatar Jan 18 '25 12:01 buckeye44

Hi @buckeye44, it's under elementInteractions. https://amplitude.com/docs/sdks/analytics/browser/browser-sdk-2#advanced-configuration-for-element-interactions

amplitude.init('API_KEY', '[email protected]', {
  autocapture: {
    elementInteractions: {
      cssSelectorAllowlist: []
    }
  }
});

Mercy811 avatar Jan 21 '25 16:01 Mercy811