Skip to main content
Question

Performance Issue After Adding Amplitude Tracking Snippet

  • November 25, 2024
  • 0 replies
  • 71 views

Hi everyone,

I’m experiencing a performance issue after adding the Amplitude tracking snippet to my website. Specifically, after implementing the snippet as described in the documentation, my site’s performance has noticeably decreased.

I added

<script src="https://cdn.amplitude.com/script/<apikey>.js"></script>

 

<script>

try {

window.amplitude.add(window.sessionReplay.plugin({sampleRate: 1}));

window.amplitude.init('<apikey>', {

"fetchRemoteConfig": true,

"autocapture": true

});

} catch(eAmplitude) {

console.log('Amplitude not installed: ', eAmplitude);

}

</script>

 

For example, when I click a button to open a Bootstrap modal popup, it now takes a few seconds to respond. However, when I remove the Amplitude tracking code, the modal opens smoothly without any delay.

Has anyone else encountered this issue? If so, do you have any suggestions on how to resolve it or optimize performance while keeping Amplitude tracking enabled?

Thank you in advance for your help!

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings