Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Grohden
Copy link

@Grohden Grohden commented May 19, 2025

Related to #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

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

Copy link

changeset-bot bot commented May 19, 2025

🦋 Changeset detected

Latest commit: 9818302

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@segment/analytics-next Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants