Skip to main content
Question

Question About Immutability of analytics.min.js for SRI Usage

  • May 20, 2025
  • 1 reply
  • 47 views

Forum|alt.badge.img

Hello,

We’re looking to implement Subresource Integrity (SRI) for enhanced security on our site and are importing the following script from your CDN:

https://cdn.segment.com/analytics.js/v1/[key]/analytics.min.js

Before proceeding, could you please confirm whether this JavaScript file is immutable—that is, once published at a given versioned path the content never changes?

This is important for us to safely apply SRI, since the hash must remain valid over time.

Thank you,

1 reply

Chauntel Greaves
Segmenter
Forum|alt.badge.img+3

Hi ​@Michael Trim, the write key is what allows events to enter into a Segment source. The write key does not change after the source is created. You can learn more about that in our documentation. If you've got technical questions specific to your implementation you can submit a ticket to our support team and they'll be able to look directly at your workspace to answer any questions.