Free account
CIPA § 631 Risk

Is PostHog legal in California?

Product Analytics & Session Replay · Updated 2026

PostHog auto-captures clicks and inputs and can record full session replays alongside product analytics. Using it is perfectly legal — but running PostHog before a visitor consents is what creates exposure under California's wiretapping law.

Is this tracker on your site? Find out free in 30 seconds.

Real browser scan with evidence capture. No signup required to see results.

Why PostHog can trigger CIPA claims

California's Invasion of Privacy Act (CIPA), Penal Code § 631, prohibits intercepting communications without all-party consent. Since 2022, a wave of plaintiff-firm litigation has applied this decades-old wiretapping statute to website session-replay, chat, and pixel tools — arguing that capturing a visitor's clicks, keystrokes, and form input without consent is an unlawful interception. PostHog's autocapture and session replay record clicks, inputs, and full sessions — actionable under CIPA when enabled before consent.

Statutory damages run up to $5,000 per violation, and plaintiffs argue each affected visitor session is a separate count — which is why even small sites receive demand letters.

Real-world enforcement

In a landmark action, the California Attorney General reached a $1.2M settlement with Sephora over its use of tracking technologies without honoring consumer privacy choices. Private CIPA suits over session-replay and chat tools have named retailers, healthcare providers, and SaaS companies alike. The common thread: trackers firing before the visitor had any chance to opt out.

How to make PostHog compliant

  1. Initialize PostHog with opt_out_capturing_by_default: true, then call posthog.opt_in_capturing() from your CMP consent callback.
  2. Disable session recording until consent (disable_session_recording: true) and enable it only after opt-in.
  3. Mask inputs in session replay (maskAllInputs: true).
  4. Re-scan with 'Verify fix' to confirm no events post to *.posthog.com pre-consent.

Consent-gating snippet

posthog.init('YOUR_KEY', {
  api_host: 'https://us.i.posthog.com',
  opt_out_capturing_by_default: true,   // no capture until opt-in
  disable_session_recording: true,
  session_recording: { maskAllInputs: true },
});
// After the visitor accepts:
cmp.onConsent('analytics', () => { posthog.opt_in_capturing(); posthog.startSessionRecording(); });

PostHog's official privacy/consent documentation →

Check your own site

RegSentry runs a real browser against your site, watches exactly when PostHog (and every other tracker) first contacts a third-party server, and captures the evidence — including whether it intercepts keystrokes typed into your forms.

Is this tracker on your site? Find out free in 30 seconds.

Real browser scan with evidence capture. No signup required to see results.

← See all tracker compliance guides