Skip to content

Commit

Permalink
Add __posthog_debug query string
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Apr 2, 2024
1 parent 174f83b commit a1619cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/posthog-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
isCrossDomainCookie,
isDistinctIdStringLike,
} from './utils'
import { window, assignableWindow } from './utils/globals'
import { window, assignableWindow, location } from './utils/globals'
import { autocapture } from './autocapture'
import { PostHogFeatureFlags } from './posthog-featureflags'
import { PostHogPersistence } from './posthog-persistence'
Expand Down Expand Up @@ -124,7 +124,7 @@ export const defaultConfig = (): PostHogConfig => ({
save_referrer: true,
capture_pageview: true,
capture_pageleave: true, // We'll only capture pageleave events if capture_pageview is also true
debug: false,
debug: (location?.search && location.search.indexOf('__posthog_debug=true') !== -1) || false,
verbose: false,
cookie_expiration: 365,
upgrade: false,
Expand Down

0 comments on commit a1619cc

Please sign in to comment.