Enable Vercel Web Analytics and Speed Insights#4
Conversation
The @vercel/analytics and @vercel/speed-insights packages were already in package.json, but the Astro Vercel adapter only injects their tracker script tags when you opt in via webAnalytics and speedInsights options. Without those flags both Vercel dashboards stay empty (0 visitors / 0 RUM samples). Verified locally: 'npm run build' succeeds and the rendered HTML now contains the Vercel Analytics initialization stub (window.va = ...) on every page. Co-Authored-By: Oz <oz-agent@warp.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Closing — this PR isn't needed. The The reason both Vercel dashboards show 0 visitors / 0 RUM samples is that the ingestion endpoints are 404'ing: Vercel only mounts those routes after the feature is enabled in the project dashboard. Fix is to click Enable on both the Analytics and Speed Insights tabs of the Per the official Astro adapter docs, with |
Summary
Pass
webAnalytics: { enabled: true }andspeedInsights: { enabled: true }to the Astro Vercel adapter so the trackers are actually injected.Why
@vercel/analyticsand@vercel/speed-insightsare already inpackage.json, and the CSP invercel.jsonalready allowlistsva.vercel-scripts.comandvitals.vercel-insights.com— but the Astro Vercel adapter only adds the tracker<script>tags when you opt in via these options. Without them, the live HTML ondocs.warp.devhas no Vercel script tags, so both the Analytics and Speed Insights tabs in the Vercel project stay at 0 visitors / 0 RUM samples (currently showing -100% over the last 7 days).Verification
npm run buildsucceeds locally. The rendereddist/index.htmlnow contains the Vercel Analytics initialization stub:After deploy, the Vercel Analytics dashboard for the
docsproject should start populating within a few minutes.Conversation
Co-Authored-By: Oz oz-agent@warp.dev