fix(analytics): relay umami events via nextjs proxy without exposing website id to client
Some checks failed
Build & Deploy / 🧪 QA (push) Successful in 2m28s
Build & Deploy / 🔍 Prepare (push) Successful in 15s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled

This commit is contained in:
2026-02-20 15:10:10 +01:00
parent c77f99ef37
commit 555e71c0a3
5 changed files with 98 additions and 10 deletions

View File

@@ -35,9 +35,9 @@ function createConfig() {
analytics: {
umami: {
websiteId: env.NEXT_PUBLIC_UMAMI_WEBSITE_ID,
websiteId: env.UMAMI_WEBSITE_ID,
apiEndpoint: env.UMAMI_API_ENDPOINT || 'https://analytics.infra.mintel.me',
enabled: Boolean(env.NEXT_PUBLIC_UMAMI_WEBSITE_ID),
enabled: typeof window !== 'undefined' || Boolean(env.UMAMI_WEBSITE_ID),
},
},

View File

@@ -31,7 +31,7 @@ const envExtension = {
INFRA_DIRECTUS_TOKEN: z.string().optional(),
// Analytics
NEXT_PUBLIC_UMAMI_WEBSITE_ID: z.string().optional(),
UMAMI_WEBSITE_ID: z.string().optional(),
UMAMI_API_ENDPOINT: z.string().optional(),
// Mail Configuration