forked from github/plane
[WEB-662] chore: posthog debugging based on env variable (#3860)
* chore: posthog debugging based on env variable * updated turbo.json * chore: true to 1 --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
"NEXT_PUBLIC_DEPLOY_WITH_NGINX",
|
"NEXT_PUBLIC_DEPLOY_WITH_NGINX",
|
||||||
"NEXT_PUBLIC_POSTHOG_KEY",
|
"NEXT_PUBLIC_POSTHOG_KEY",
|
||||||
"NEXT_PUBLIC_POSTHOG_HOST",
|
"NEXT_PUBLIC_POSTHOG_HOST",
|
||||||
|
"NEXT_PUBLIC_POSTHOG_DEBUG",
|
||||||
"JITSU_TRACKER_ACCESS_KEY",
|
"JITSU_TRACKER_ACCESS_KEY",
|
||||||
"JITSU_TRACKER_HOST"
|
"JITSU_TRACKER_HOST"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ const PostHogProvider: FC<IPosthogWrapper> = (props) => {
|
|||||||
if (posthogAPIKey && posthogHost) {
|
if (posthogAPIKey && posthogHost) {
|
||||||
posthog.init(posthogAPIKey, {
|
posthog.init(posthogAPIKey, {
|
||||||
api_host: posthogHost || "https://app.posthog.com",
|
api_host: posthogHost || "https://app.posthog.com",
|
||||||
|
debug: process.env.NEXT_PUBLIC_POSTHOG_DEBUG === "1", // Debug mode based on the environment variable
|
||||||
autocapture: false,
|
autocapture: false,
|
||||||
capture_pageview: false, // Disable automatic pageview capture, as we capture manually
|
capture_pageview: false, // Disable automatic pageview capture, as we capture manually
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user