Skip to content

Fix Vercel analytics script placement#7

Merged
bholmesdev merged 1 commit intomainfrom
benjamin/fix-vercel-analytics-noscript
Apr 30, 2026
Merged

Fix Vercel analytics script placement#7
bholmesdev merged 1 commit intomainfrom
benjamin/fix-vercel-analytics-noscript

Conversation

@bholmesdev
Copy link
Copy Markdown
Contributor

Summary

Fixes Vercel Analytics and Speed Insights script placement so production builds execute the analytics bootstrap scripts.

Changes

  • Moves the Google Fonts <noscript> fallback after the Vercel Analytics and Speed Insights components in src/components/CustomHead.astro.
  • Prevents Astro from emitting the Vercel custom elements and module scripts inside <noscript>, where browsers skip them when JavaScript is enabled.

Validation

  • Ran npm run build successfully.
  • Verified generated dist/index.html places <vercel-analytics> and <vercel-speed-insights> before <noscript> and includes /_vercel/insights/script.js plus /_vercel/speed-insights/script.js references.

Oz artifacts

Co-Authored-By: Oz oz-agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label Apr 30, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 30, 2026 9:42pm

Request Review

Co-Authored-By: Oz <oz-agent@warp.dev>
@bholmesdev bholmesdev merged commit c92f3c9 into main Apr 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants