mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -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:
parent
489dd8d69c
commit
26daba8d9f
2 changed files with 6 additions and 1 deletions
5
.changeset/cyan-fireants-care.md
Normal file
5
.changeset/cyan-fireants-care.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@astrojs/vercel': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix vercel analytics id not being set
|
|
@ -39,7 +39,7 @@ const sendToAnalytics = (metric: Metric, options: Options) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
function webVitals() {
|
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) {
|
if (!analyticsId) {
|
||||||
console.error('[Analytics] VERCEL_ANALYTICS_ID not found');
|
console.error('[Analytics] VERCEL_ANALYTICS_ID not found');
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue