diff --git a/preview/vercel.json b/preview/vercel.json index 1acdbf2a5..683aa92d8 100644 --- a/preview/vercel.json +++ b/preview/vercel.json @@ -8,6 +8,14 @@ "source": "/stats/event", "destination": "https://plausible.io/api/event" }, + { + "source": "/eat/static/:path(.*)", + "destination": "https://eu-assets.i.posthog.com/static/:path*" + }, + { + "source": "/eat/:path(.*)", + "destination": "https://eu.i.posthog.com/:path*" + }, { "source": "/(.*)", "destination": "/error-404.html" diff --git a/shared/includes/layout/analytics.html b/shared/includes/layout/analytics.html index 38e5007c6..2d5d1e227 100644 --- a/shared/includes/layout/analytics.html +++ b/shared/includes/layout/analytics.html @@ -16,7 +16,7 @@ if (['docs.tabler.io', 'preview.tabler.io'].includes(currentDomain)) { posthog.init('{{ posthogApiKey }}', { - api_host: '{{ posthogHost }}', + api_host: `/eat`, person_profiles: 'identified_only', capture_pageview: true, capture_pageleave: true,