Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-662] chore: posthog debugging based on env variable (#3860)

Lakhan Bahetidbdd14493b05
diff --git a/turbo.json b/turbo.json
index bd5ee34b59..9302a71831 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 e8c1b7899a..c5acd29576 100644
--- a/web/lib/posthog-provider.tsx
+++ b/web/lib/posthog-provider.tsx
@@ -45,6 +45,7 @@ const PostHogProvider: FC<IPosthogWrapper> = (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
});