diff --git a/.env.example b/.env.example index 63023bcb..598f16c7 100644 --- a/.env.example +++ b/.env.example @@ -82,7 +82,8 @@ VITE_APP_NAME="${APP_NAME}" # PostHog Analytics VITE_POSTHOG_ENABLED=false VITE_POSTHOG_API_KEY= -VITE_POSTHOG_HOST=https://eu.i.posthog.com +VITE_POSTHOG_HOST=https://t.whisper.money +VITE_POSTHOG_UI_HOST=https://eu.posthog.com # Stripe Configuration STRIPE_KEY= diff --git a/resources/js/lib/posthog.ts b/resources/js/lib/posthog.ts index f6751105..84b4907b 100644 --- a/resources/js/lib/posthog.ts +++ b/resources/js/lib/posthog.ts @@ -13,7 +13,11 @@ const getPostHogApiKey = (): string | undefined => { }; const getPostHogHost = (): string => { - return import.meta.env.VITE_POSTHOG_HOST || 'https://eu.i.posthog.com'; + return import.meta.env.VITE_POSTHOG_HOST || 'https://t.whisper.money'; +}; + +const getPostHogUiHost = (): string => { + return import.meta.env.VITE_POSTHOG_UI_HOST || 'https://eu.posthog.com'; }; export const isPostHogSessionRecordingEnabled = (): boolean => { @@ -42,6 +46,7 @@ export function initializePostHog(): void { posthog.init(apiKey, { api_host: host, + ui_host: getPostHogUiHost(), person_profiles: 'always', disable_session_recording: !isPostHogSessionRecordingEnabled(), loaded: () => {