Haych/dev Consent Gate icon

Haych/dev Consent Gate

GDPR + CCPA cookie consent that actually blocks scripts. No cookies set by the plugin itself.

Free · GPLv2WordPress 6.2+PHP 7.4+v0.1.4

Consent Gate blocks third-party scripts before they execute — not just shows a banner. When a visitor lands on your site for the first time, analytics and marketing scripts are held as inert HTML (type="text/plain") until they choose. Once they accept, the scripts fire in-browser without a page reload.

Unlike heavyweight consent platforms that call home to verify consent or inject their own tracking, Consent Gate has zero external HTTP calls. Everything runs locally — the banner is injected by the same JS file that handles consent, and the visitor's choice lives in their own localStorage.

Why Haych/dev Consent Gate

  • Scripts blocked, not just bannered

    Non-essential scripts are rewritten to type="text/plain" so browsers never execute them. They only load after the visitor explicitly consents — no "implied consent" workarounds.

  • Genuinely lightweight

    A ~3KB vanilla JS file handles the banner, consent storage, and script re-injection. No jQuery, no npm runtime, no CDN dependency.

  • 50 trackers blocked out of the box

    A built-in pattern library covers GA4, Facebook Pixel, HotJar, Clarity, Intercom, LinkedIn, TikTok, and 43 more. Unknown scripts can be added via the admin UI — no code required.

  • localStorage only — no cookie irony

    Consent is stored in the visitor's localStorage, not a cookie. The plugin sets zero cookies itself. GDPR-correct and slightly poetic.

  • GDPR opt-in + CCPA opt-out

    Analytics and Marketing are off by default. The "Do Not Sell My Personal Information" link sets marketing to false and reloads to purge already-loaded scripts. No GeoIP needed.

  • Consent version invalidation

    Bump the consent version number in settings to re-ask all visitors. Useful when you add a new third-party tool or change your privacy policy.

Screenshots

The minimal one-liner consent bar fixed to the bottom of the viewport, with Manage, Do Not Sell, Decline, and Accept controls.The WordPress admin settings page showing auto-detected third-party scripts with category and block toggles.

Free vs Pro

Free

GPLv2
  • Consent banner with sensible defaults
  • Block scripts via URL patterns you enter manually
  • localStorage-based consent storage, no cookies set
  • GDPR opt-in and opt-out behaviour out of the box
  • Zero third-party calls or tracking
Pro

Pro

$49.99
per year
Unlimited sites

Everything in Free, plus:

  • Pattern library that auto-detects 50+ trackers
  • Consent version invalidation to re-ask all visitors
  • CCPA Do Not Sell My Personal Information link
  • Customise banner position, colours, and button text
Buy Haych/dev Consent Gate Pro

FAQ

Does it slow down my site?
The consent JS is ~3KB and deferred. On pages where the visitor has already consented, it reads localStorage and re-injects blocked scripts without any server round-trip.
Does the plugin set any cookies itself?
No. Consent is stored in the visitor's localStorage — same-site only, never sent to a server, never readable by third parties.
Which scripts does it block automatically?
It ships with 50 known tracker patterns covering all major analytics and marketing tools. You can override categories, disable blocking per handle, or add custom URL patterns in the admin settings.
What happens when a visitor declines?
Blocked scripts stay inert for the session and all future sessions until the visitor changes their preference via the "Manage" link in the footer.
Does it support CCPA?
Yes. A "Do Not Sell My Personal Information" link is shown in the consent bar (toggleable in settings). Clicking it sets the marketing category to false and reloads the page to purge any already-loaded marketing scripts.
Do I need to modify my theme or existing plugins?
No. The plugin hooks into WordPress's script_loader_tag filter, so any script registered via wp_enqueue_script is automatically intercepted. Nothing in your theme needs to change.