=== COKIQ Cookie Consent ===
Contributors: hostao, rejimodiyil
Tags: cookie consent, gdpr, cookie banner, google consent mode, ccpa
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.2.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Cookie consent banner with Google Consent Mode v2 and WP Consent API support. Helps with GDPR, CCPA and India DPDP.

== Description ==

COKIQ Cookie Consent adds the COKIQ consent banner to your WordPress or WooCommerce site and shares each visitor's choice with Google tags and with other plugins.

* **Google Consent Mode v2** – denied defaults are set in the page head before Google tags run, then updated after the visitor chooses. Basic and advanced mode.
* **WP Consent API** – registers COKIQ as your consent plugin (opt-in), so plugins such as Site Kit by Google and WooCommerce can read the choice with `wp_has_consent()`.
* **Regional banners** – EU/UK/Switzerland opt-in, US "Do Not Sell or Share" wording and India DPDP notices, chosen by visitor location. Setup guidance for Gulf privacy laws (UAE, Saudi Arabia) on cokiq.com.
* **24 languages**, picked automatically from the visitor's browser.
* **Proof of consent** – each choice is logged in your COKIQ dashboard with the banner version, for audits and data-subject requests.
* **Cookie scan** – the COKIQ dashboard scans your pages and groups cookies into Necessary, Preferences, Analytics and Marketing.
* Light: one small script, no jQuery, no database tables.

COKIQ helps you meet consent rules; it does not replace legal advice. COKIQ is not an IAB TCF registered CMP.

= How it works =

1. Create a free account at [cokiq.com](https://cokiq.com) and add your domain.
2. Copy the site key.
3. Paste it in **Settings > COKIQ Consent** and save.

The banner appears on public pages. Change its design, text and categories in the COKIQ dashboard; no theme edits needed.

== External services ==

This plugin connects to the COKIQ consent service at cokiq.com, operated by Hostao L.L.C (USA). The service is required: the plugin itself only adds the banner to your pages.

* **What is loaded:** after you save a site key, every public page loads the banner script from `https://cokiq.com/api/s/<your site key>`. Nothing is loaded before a site key is saved, and nothing is loaded in wp-admin.
* **What is sent and when:** when the script loads, the visitor's browser requests it from cokiq.com (IP address, user agent and page URL reach the server, as with any web request). When a visitor makes or changes a consent choice, the choice (accepted categories), the banner version, a random consent ID, the page URL, a timestamp and the visitor's country are sent to cokiq.com and stored as proof of consent for the site owner.
* **Why:** to show the banner, apply the right regional rules and keep a consent log the site owner can show to regulators.
* **Branding:** on the free COKIQ plan the banner shows a small "Powered by COKIQ" link. Paid plans can remove it in the COKIQ dashboard.

COKIQ Terms of Service: https://cokiq.com/terms
COKIQ Privacy Policy: https://cokiq.com/privacy
Data Processing Agreement: https://cokiq.com/dpa

== Installation ==

1. Install the plugin from **Plugins > Add New** (search "COKIQ") or upload the `cokiq` folder to `/wp-content/plugins/`.
2. Activate **COKIQ Cookie Consent**.
3. Go to **Settings > COKIQ Consent**, paste your COKIQ site key and save.
4. Open your site in a private window: the banner should appear. Your choice shows up in the COKIQ dashboard under Consent logs.

Optional: install the free [WP Consent API](https://wordpress.org/plugins/wp-consent-api/) plugin so other plugins can read the visitor's choice.

== Frequently Asked Questions ==

= Is COKIQ free? =

Yes, there is a free plan (with COKIQ branding on the banner and 30-day consent logs). Paid plans add more sites, longer log retention and branding removal. See https://cokiq.com/pricing.

= Does it work with WooCommerce? =

Yes. The banner loads on every public page, including shop, cart and checkout, and does not change checkout or payment behaviour.

= Does it support Google Consent Mode v2? =

Yes. COKIQ sets the four Consent Mode v2 signals (ad_storage, analytics_storage, ad_user_data, ad_personalization) to denied before Google tags load and updates them after the visitor's choice.

= Does it block scripts before consent? =

COKIQ blocks the categories you mark in the dashboard and works with Google Consent Mode. Plugins that use the WP Consent API respect the visitor's choice automatically.

= Where is consent data stored? =

On COKIQ servers operated by Hostao L.L.C. See the External services section and https://cokiq.com/privacy.

= Where do I get help? =

Email support@cokiq.com or use https://cokiq.com/support.

== Screenshots ==

1. Settings > COKIQ Consent: paste your site key, see the external-service notice, WP Consent API status and Google Consent Mode v2 status.
2. The COKIQ consent banner on a WordPress + WooCommerce site (Accept All, Reject All, Customize).
3. Preference centre: visitors switch Analytics, Marketing and Preferences cookies on or off.

== Changelog ==

= 0.2.3 =
* Text domain and package folder now match the plugin slug (cokiq). Readme contributors updated.

= 0.2.2 =
* Translation-ready admin screen (text domain cokiq).
* Settings page explains the external COKIQ service and links to terms, privacy policy and DPA.
* Plugin options are removed on uninstall.
* Tested with WordPress 7.1.

= 0.2.1 =
* The COKIQ script sets COKIQ's Google developer ID once per page, before the Consent Mode default command.

= 0.2.0 =
* WP Consent API support: registers COKIQ as the consent plugin (opt-in) and maps COKIQ categories to functional, preferences, statistics, statistics-anonymous and marketing.
* Script loads in the head, before other tags, so Google Consent Mode v2 defaults are set first.

= 0.1.0 =
* First release.

== Upgrade Notice ==

= 0.2.3 =
Maintenance release: text domain now matches the plugin slug.

= 0.2.2 =
Translation-ready settings page and clean uninstall.
