WP Manifestindependent plugin directory
manifest / privacy / cookie-consent-manager

Cookie Consent Manager

Cookie consent engine — granular categories, automatic third-party script blocking, consent logging for audits, and Google Consent Mode v2 support. Built as the core engine of a larger cookie-compliance plugin (banner + logging now; geo-targeting, cookie scanning and auto policy generation planned for later phases).

by Paul Potoki · github.com/potokipaul/cookie-consent-manager · website

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/potokipaul/cookie-consent-manager/archive/refs/heads/main.zip

A WordPress cookie consent engine: granular consent categories, automatic third-party script blocking, an audit-ready consent log, and Google Consent Mode v2 support. Built as the core engine of a larger cookie-compliance plugin.

Features (v0.1.0)

  • Banner — Accept All / Reject Non-Essential / Customize, keyboard operable, rendered in a Shadow DOM so it can't collide with theme CSS.
  • Google Consent Mode v2 — default-denied state fires before any tag can load; updates per category the moment the visitor decides.
  • Automatic script blocking — a built-in, editable pattern list catches common third-party trackers (Google tags, Meta Pixel, Hotjar, ad networks, etc.) in the rendered HTML regardless of how they were embedded, and keeps them inert until the matching category is accepted.
  • Manual script mapping — map any wp_enqueue_script() handle to a category from Settings, no code required.
  • Consent logging — every decision stored with timestamp, categories accepted, method, policy version, region (where detectable), and a salted hash of an anonymized IP — never a raw, reversible IP.
  • Modern log viewer — stat cards, filters (method / region / date range / consent ID), CSV export for compliance requests.
  • Legal page links — link Privacy Policy / Terms of Service / Disclaimer (existing WP page or custom URL); shown in the Customize panel only when set.
  • Region detection — via CDN headers (Cloudflare, CloudFront, Fastly, Sucuri); no external API calls.

Installation

  1. Download or clone this repo.
  2. Zip the cookie-consent-manager folder, or symlink it into wp-content/plugins/.
  3. Activate from WP Admin → Plugins.
  4. Configure at Settings → Cookie Consent.

Roadmap

  • Geo-targeted banner posture (opt-in for EU/UK/Quebec/Nigeria vs. opt-out/GPC for the rest of the US) — the region column already exists in the schema, just not driving banner behavior yet.
  • MaxMind GeoLite2 local-DB fallback for sites not behind a geo-aware CDN.
  • Automated periodic cookie scanning.
  • Auto-generated, auto-updating Cookie & Privacy Policy pages.
  • Full multilingual support (WPML/Polylang) and a formal WCAG audit.

See readme.txt for developer notes (wiring a "Manage Cookies" link, checking consent in your own JS, wrapping inline third-party snippets) and known limitations (GTM container blocking trade-offs).

Before going live

Banner copy and category descriptions are starting points, not legal text — confirm actual wording and region-specific requirements (opt-in vs. opt-out posture) with whoever owns the site before launch.

License

GPLv2 or later — see LICENSE.