Skip to content

Purge the ChatGPT Ads pixel's cookie and web storage on reject/withdraw - #24

Merged
davidperezgar merged 2 commits into
mainfrom
fix/withdraw-purge-openai
Nov 11, 2026
Merged

davidperezgar merged 2 commits into
mainfrom
fix/withdraw-purge-openai

Conversation

@amulero

@amulero amulero commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Problem

When a visitor accepted cookies and then rejected them (or withdrew consent from the cookie icon), the ChatGPT Ads (OpenAI) pixel left two things in the browser:

  • the __obref cookie
  • an oaiq_cs:… entry in sessionStorage

What 1.0.2 already did

Since 1.0.2, rejecting or withdrawing consent deletes the known tracking cookies (Google Analytics, Google Ads, Meta, Clarity, Brevo, WooCommerce) and reloads the page so nothing keeps running. That part is unchanged.

Solution

  • __obref and oaiq_* are added to the list of tracking data to delete.
  • The deletion now also cleans localStorage and sessionStorage, not only cookies, using the same list.

After rejecting, only FrontConsent's own consent cookies remain.

Tests

New tests for the cookie and storage deletion. PHPUnit, JS tests, phpcs and phpstan pass.

Version: 1.0.3-beta.withdraw.

amulero and others added 2 commits November 6, 2026 12:36
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>
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>
@davidperezgar
davidperezgar merged commit 9f8bfc4 into main Nov 11, 2026
6 checks passed
@davidperezgar
davidperezgar deleted the fix/withdraw-purge-openai branch November 11, 2026 08:16
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