analytics-next icon indicating copy to clipboard operation
analytics-next copied to clipboard

feat(browser): support for nonce in some loadScript calls

Open Grohden opened this issue 5 months ago • 1 comments

Related to https://github.com/segmentio/analytics-next/issues/377

I'm adding the support for calling analytics.load(settings, { nonce }) and carrying that nonce to most places where segment injects scripts. I've also fixed a lil typo.

Note: this does not cover all places AFAIK, there's some polyfills somewhere which might need attention. I'm not focusing this PR on them.

Note 2: I've tested this here locally in a nextjs project

  • [x] I've included a changeset (psst. run yarn changeset. Read about changesets here).

Grohden avatar May 19 '25 12:05 Grohden