From f4cbd51f2e4a88ef57ac72bd73859b2d3541d445 Mon Sep 17 00:00:00 2001 From: Petra Donka Date: Thu, 30 Apr 2026 21:39:00 +0200 Subject: [PATCH] Enable Vercel Web Analytics and Speed Insights 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 --- astro.config.mjs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/astro.config.mjs b/astro.config.mjs index 5a2dcd5e..dfa61041 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -159,5 +159,14 @@ export default defineConfig({ ], adapter: vercel({ edgeMiddleware: true, + // Inject the Vercel Web Analytics + Speed Insights trackers. The + // `@vercel/analytics` and `@vercel/speed-insights` packages are + // already installed; the adapter is responsible for adding the + // `