From d0428aff0c0a3c8e12e813d7c5e10212826a34a4 Mon Sep 17 00:00:00 2001 From: echo Date: Sun, 1 Mar 2026 02:09:21 +0100 Subject: [PATCH] fix: use correct PostHog API host from environment variable Changed from hardcoded '/ingest' to VITE_PUBLIC_POSTHOG_HOST env var to ensure PostHog events are sent to the correct EU endpoint. --- frontend/src/main.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 923ce53..c677cdf 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -13,13 +13,16 @@ initializeTheme(); const queryClient = new QueryClient() const posthogOptions = { - api_host: '/ingest', - ui_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST || 'https://eu.posthog.com', + api_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST, defaults: '2026-01-30', - capture_exceptions: true, - debug: import.meta.env.DEV, } as const +// Debug PostHog configuration +console.log('PostHog Config:', { + apiKey: import.meta.env.VITE_PUBLIC_POSTHOG_KEY ? '✓ Set' : '✗ Missing', + apiHost: import.meta.env.VITE_PUBLIC_POSTHOG_HOST, +}) + ReactDOM.createRoot(document.getElementById('root')!).render(