From 26daba8d9fd2e7cac8e506a2a36cd6f40ab25f16 Mon Sep 17 00:00:00 2001 From: Nathaniel Blackburn Date: Wed, 5 Apr 2023 14:23:40 +0100 Subject: [PATCH] @astrojs/vercel: Fix vercel analytics id not being provided (#6751) * fix wrong environment variable being used * added changeset --- .changeset/cyan-fireants-care.md | 5 +++++ packages/integrations/vercel/src/analytics.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/cyan-fireants-care.md diff --git a/.changeset/cyan-fireants-care.md b/.changeset/cyan-fireants-care.md new file mode 100644 index 0000000000..58316e3b71 --- /dev/null +++ b/.changeset/cyan-fireants-care.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vercel': patch +--- + +Fix vercel analytics id not being set diff --git a/packages/integrations/vercel/src/analytics.ts b/packages/integrations/vercel/src/analytics.ts index 95dee83e37..6a06dffc01 100644 --- a/packages/integrations/vercel/src/analytics.ts +++ b/packages/integrations/vercel/src/analytics.ts @@ -39,7 +39,7 @@ const sendToAnalytics = (metric: Metric, options: Options) => { }; function webVitals() { - const analyticsId = (import.meta as any).env.PUBLIC_VERCEL_ANALYTICS_ID; + const analyticsId = (import.meta as any).env.VERCEL_ANALYTICS_ID; if (!analyticsId) { console.error('[Analytics] VERCEL_ANALYTICS_ID not found'); return;