Skip to content

Commit

Permalink
@astrojs/vercel: Fix vercel analytics id not being provided (#6751)
Browse files Browse the repository at this point in the history
* fix wrong environment variable being used

* added changeset
  • Loading branch information
nblackburn authored Apr 5, 2023
1 parent 489dd8d commit 26daba8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cyan-fireants-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/vercel': patch
---

Fix vercel analytics id not being set
2 changes: 1 addition & 1 deletion packages/integrations/vercel/src/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 26daba8

Please sign in to comment.