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

Session Replay scripts being loaded even though feature not in use

Open rozumem opened this issue 10 months ago • 0 comments

Summary

I recently migrated to Browser SDK 2 and I have the session replay feature disabled.

But when I look at the network tab on Dev Tools I see the following being loaded:

https://cdn.amplitude.com/libs/plugin-session-replay-browser-1.12.1-min.js.gz

I also see log messages like the following on Sentry:

Amplitude Logger [Warn]: Failed to store session replay events in IndexedDB: UnknownError: Attempt to get a record from database without an in-progress transaction

Is this expected behavior or am I doing something wrong in my setup?

Code

This is how I'm loading the SDK:

  <!-- Start Amplitude -->
  <script type="text/javascript" src="https://cdn.amplitude.com/script/<%= amplitudeAppId %>.js"></script>
  <script type="text/javascript">
    window.amplitude.init(
      "<%= amplitudeAppId %>",
      {
        optOut: true,
        minIdLength: 1,
        autocapture: {
          attribution: true,
          sessions: true,
          pageViews: false,
          formInteractions: false,
          fileDownloads: false,
          elementInteractions: false,
        },
      },
    );
  </script>
  <!-- End Amplitude -->

Thanks.

rozumem avatar Feb 10 '25 05:02 rozumem