Skip to content

Delete tracking cookies when consent is rejected or withdrawn - #18

Merged
davidperezgar merged 1 commit into
mainfrom
fix/purge-tracking-cookies-on-reject
Oct 29, 2026
Merged

davidperezgar merged 1 commit into
mainfrom
fix/purge-tracking-cookies-on-reject

Conversation

@amulero

@amulero amulero commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Rejecting only stopped new tags from loading: cookies already written while consent was granted (e.g. GA's _ga on the parent domain) stayed on the visitor's device. FrontConsent now expires known analytics and marketing cookies on the host and every parent domain when the visitor rejects, withdraws an earlier acceptance, or returns after rejecting.

The list is passed to the banner script as purgeCookies and can be changed with the frcn_cookie_notice_purge_cookies filter; a trailing * matches a prefix.

Rejecting only stopped new tags from loading: cookies already written
while consent was granted (e.g. GA's `_ga` on the parent domain) stayed
on the visitor's device. FrontConsent now expires known analytics and
marketing cookies on the host and every parent domain when the visitor
rejects, withdraws an earlier acceptance, or returns after rejecting.

The list is passed to the banner script as `purgeCookies` and can be
changed with the `frcn_cookie_notice_purge_cookies` filter; a trailing
`*` matches a prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davidperezgar
davidperezgar merged commit 04c48e9 into main Oct 29, 2026
7 checks passed
@davidperezgar
davidperezgar deleted the fix/purge-tracking-cookies-on-reject branch October 29, 2026 11:00
davidperezgar pushed a commit that referenced this pull request Nov 11, 2026
…aw (#24)

* Purge the ChatGPT Ads pixel's cookie and web storage on reject/withdraw

1.0.2 (#18) already deletes known tracking cookies (GA, Ads, Meta, Clarity,
Brevo, sbjs_*) when the visitor rejects or withdraws consent. tuwebcumple.es
still flagged "withdrawing consent really undoes it": the OpenAI ChatGPT Ads
pixel left its __obref cookie and an oaiq_cs:<pixel id> sessionStorage entry.

- Add __obref and oaiq_* to the purge list.
- Apply the purge list to localStorage/sessionStorage keys as well.
- Version 1.0.3-beta.withdraw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Leave version and changelog to the release commit

The version bump and changelog entry are done once on main when 1.0.3 is
released, so the open PRs do not conflict with each other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: amulero <angie@closemarketing.net>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants