Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading