Skip to content

fix(release): promote the DNT and GPC opt-out - #145

Merged
scttbnsn merged 2 commits into
mainfrom
dev
Nov 18, 2026
Merged

scttbnsn merged 2 commits into
mainfrom
dev

Conversation

@scttbnsn

Copy link
Copy Markdown
Collaborator

Promote #144 from dev: visitors whose browser sends Do Not Track or Global Privacy Control now skip PostHog entirely. posthog-js 1.447.2 treats cookieless_mode: "always" as capturing before it checks respect_dnt, so the site checks the signals itself, before posthog.init and again in before_send.

#144 passed verify, and CodeRabbit had no actionable comments. Locally, check, build, Qlty and the PostHog unit, contract and browser tests (37/37) pass. The only other commit is a merge of main that changes no files.

posthog-js is_capturing() returns true under cookieless_mode always before it checks respect_dnt, so DNT and GPC visitors were still tracked. Skip posthog.init, the error listeners and pageviews when the browser opts out, and drop events in before_send as a second guard.
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 60b7ecf and ec0c5b2.

Files selected for processing: 4

  • frontend/instrumentation-client.ts
  • frontend/lib/posthog-privacy.ts
  • frontend/test/posthog-source.test.mjs
  • frontend/test/posthog.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same diff CodeRabbit reviewed clean on #144.

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same diff CodeRabbit reviewed clean on #144.

@scttbnsn
scttbnsn merged commit 4f9e3ff into main Nov 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants