diff --git a/turbo.json b/turbo.json index bd5ee34b5..9302a7183 100644 --- a/turbo.json +++ b/turbo.json @@ -16,6 +16,7 @@ "NEXT_PUBLIC_DEPLOY_WITH_NGINX", "NEXT_PUBLIC_POSTHOG_KEY", "NEXT_PUBLIC_POSTHOG_HOST", + "NEXT_PUBLIC_POSTHOG_DEBUG", "JITSU_TRACKER_ACCESS_KEY", "JITSU_TRACKER_HOST" ], diff --git a/web/lib/posthog-provider.tsx b/web/lib/posthog-provider.tsx index e8c1b7899..c5acd2957 100644 --- a/web/lib/posthog-provider.tsx +++ b/web/lib/posthog-provider.tsx @@ -45,6 +45,7 @@ const PostHogProvider: FC = (props) => { if (posthogAPIKey && posthogHost) { posthog.init(posthogAPIKey, { api_host: posthogHost || "https://app.posthog.com", + debug: process.env.NEXT_PUBLIC_POSTHOG_DEBUG === "1", // Debug mode based on the environment variable autocapture: false, capture_pageview: false, // Disable automatic pageview capture, as we capture manually });