analytics-next
analytics-next copied to clipboard
feat(browser): support for nonce in some loadScript calls
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).