Skip to content

fix(plausible): use consistent window reference in clientInit stub - #574

Merged
harlan-zw merged 1 commit into
mainfrom
fix/543
Jan 15, 2026
Merged

fix(plausible): use consistent window reference in clientInit stub#574
harlan-zw merged 1 commit into
mainfrom
fix/543

Conversation

@harlan-zw

@harlan-zwharlan-zw commented Jan 15, 2026

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Resolves#543

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)

📚 Description

The clientInit stub for Plausible Analytics was using bare plausible identifier mixed with window.plausible, which can cause issues in ES module scope where identifier resolution differs from non-module scripts.

Fixes#543
The clientInit stub was using bare `plausible` identifier mixed with
`window.plausible`, which can cause issues in ES module scope. Updated
to use consistent `window` reference throughout, matching the pattern
used by Google Analytics.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel

vercelBot commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentReviewUpdated (UTC)
scripts-docsReadyReadyPreview, CommentJan 15, 2026 2:51pm
scripts-playgroundReadyReadyPreview, CommentJan 15, 2026 2:51pm

@pkg-pr-new

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/scripts/@nuxt/scripts@574

commit: 09b6688

@harlan-zw
harlan-zw merged commit 4c79486 into mainJan 15, 2026
10 checks passed
@harlan-zw
harlan-zw deleted the fix/543 branch January 15, 2026 14:58
@harlan-zwharlan-zw mentioned this pull request Jan 23, 2026
zizzfizzix pushed a commit to zizzfizzix/nuxt-scripts that referenced this pull request Mar 5, 2026
…uxt#574)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for freeto 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.

Plausible's new script not working

1 participant

@harlan-zw