=== ClearConsent ===
Contributors: jessn
Tags: cookie consent, gdpr, google consent mode, cookie banner, privacy
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Cookie consent banner with Google Consent Mode v2 and consent-based script blocking. Self-hosted, caching-friendly, no third-party CMP.

== Description ==

ClearConsent is a lightweight, self-hosted cookie consent plugin. It shows visitors a consent banner, holds your tracking scripts until they choose, and sends Google Consent Mode v2 signals — all handled on your own site, with no calls out to a third-party consent platform.

It's built to stay out of the way: the banner is plain JavaScript (no jQuery), consent is applied in the visitor's browser, and your pages cache normally — so adding consent doesn't slow your site down or break full-page caching.

**Free features**

* Customizable consent banner — accept, reject, and per-category preferences.
* Configure up to 3 consent services or categories.
* **Google Consent Mode v2** — sends the full set of v2 consent signals (analytics_storage, ad_storage, ad_user_data, ad_personalization, and more), defaulted to denied, and loads your Google tags only after the visitor consents.
* Consent-based script control — automatically holds recognized scripts you've added as services, plus any script you tag for consent, and activates them when the visitor agrees.
* Region rules — show or adjust the banner based on the visitor's region. You decide where and how it appears; ClearConsent does not determine your legal obligations.
* Honors Global Privacy Control (GPC).
* No data leaves your site — consent is stored and handled entirely on your own WordPress install.

**ClearConsent Pro**

* **Automatic scanning** — find the trackers and cookies actually running on your site.
* **Automatic blocking** — catch hardcoded and inline trackers, not just the ones you've tagged.
* Unlimited services and categories.
* **Script Manager** — hold and manage tags for consent without editing code.
* Custom banner styling.
* Consent logging with CSV export — keep records of the consent your visitors gave.
* Translations for a multilingual banner.

**ClearConsent Agency**

* White-label the plugin as your own.
* Multisite: scan and push consent settings across every site in your network.

== Installation ==

1. Upload the `clearconsent` folder to `/wp-content/plugins/`, or install through Plugins → Add New.
2. Activate the plugin through the Plugins screen.
3. Go to Settings → ClearConsent.
4. Add the services you use (for example Google Analytics), customize the banner text, and save.
5. Optional: enable Google Consent Mode v2 under the Consent Mode section.

== Frequently Asked Questions ==

= Does this make my site GDPR or privacy-law compliant? =

No plugin can do that on its own. ClearConsent gives you the controls — a consent banner, consent-gated script loading, and Google Consent Mode signals — but how you configure them, and what your legal obligations are, is up to you. If you're unsure, talk to someone qualified in privacy law for your situation.

= How do I make sure my Google Analytics or Google tag waits for consent? =

Add it the supported way so ClearConsent controls it: configure it as a service in Settings → ClearConsent, or tag the script with `type="text/plain"` and a `data-cc-name` attribute. ClearConsent then loads it only after the visitor consents. If you paste a `gtag` snippet directly high in your theme's `<head>`, it can run before the consent default is set — so add it through the normal method, or place it after ClearConsent's output. Pro's scanning and Script Manager handle this for you.

= Does it support Google Consent Mode v2? =

Yes, in the free version. ClearConsent sets all v2 consent signals to denied by default and updates them when the visitor makes a choice. Google tags load after consent (consent-gated mode).

= Will it work with my caching plugin or host cache? =

Yes. Consent is applied in the visitor's browser, and the page HTML is the same for everyone, so your pages cache normally. After you change which services are blocked, clear your page cache so the change takes effect right away.

= Will it slow down my site? =

It's designed not to. The banner is lightweight vanilla JavaScript, and because it's caching-friendly it doesn't force your pages to load uncached.

= Does it support multisite? =

Network-wide scanning and pushing settings across subsites is part of ClearConsent Agency.

== Screenshots ==

1. The consent banner your visitors see — shown before any tracking loads.
2. The preferences modal: visitors turn individual services on or off, grouped by category.
3. Define the services you use and how they appear — no code required.
4. Google Consent Mode v2 built in — all signals denied by default, Google tags wait for consent.
5. Region rules — show or adjust the banner by country or US state. You decide where and how it appears.
6. Pro: automatic scanning finds the trackers and cookies actually running on your site.
7. Pro: style the banner to match your site, or start from a built-in template.
8. Pro: a consent log records each visitor's choice, with CSV export. Visitor IPs are anonymized.
9. Agency: push consent settings across every site in a multisite network.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release of ClearConsent.
