Skip to content

Commit

Permalink
[WEB-662] chore: posthog debugging based on env variable (#3860)
Browse files Browse the repository at this point in the history
* chore: posthog debugging based on env variable

* updated turbo.json

* chore: true to 1

---------

Co-authored-by: gurusainath <gurusainath007@gmail.com>
  • Loading branch information
1akhanBaheti and gurusainath committed Mar 6, 2024
1 parent 4572b73 commit dbdd144
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down
1 change: 1 addition & 0 deletions web/lib/posthog-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down

0 comments on commit dbdd144

Please sign in to comment.