From d729a75af03ddc372ec6c2c60079d25f47239d59 Mon Sep 17 00:00:00 2001 From: Aleksey Razbakov Date: Wed, 15 Apr 2026 03:16:45 +0200 Subject: [PATCH] Set posthog runtimeConfig defaults so module reads non-empty key PR #429 set the module-level posthog.publicKey but runtimeConfig.public.posthog still defaulted to empty strings, which override the module config at runtime when Vercel env vars are unset. Result: deployed __NUXT__.config.public.posthog showed publicKey:'' and the client never initialized. Set the same public phc_ key here so both layers agree. --- nuxt.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index defcaa5e..b1e7b326 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -146,8 +146,8 @@ export default defineNuxtConfig({ mailgunWebhookKey: '', public: { posthog: { - publicKey: '', - host: '', + publicKey: 'phc_N7rtjDNLzyAGTOkhwhPBrEPybpxBwLlMpfPI9j1xZWB', + host: 'https://eu.i.posthog.com', }, posthogDisabled: '', appUrl: '',