0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

@astrojs/vercel: Fix vercel analytics id not being provided (#6751)

* fix wrong environment variable being used

* added changeset
This commit is contained in:
Nathaniel Blackburn 2023-04-05 14:23:40 +01:00 committed by GitHub
parent 489dd8d69c
commit 26daba8d9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/vercel': patch
---
Fix vercel analytics id not being set

View file

@ -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;