=== UZYTAK Cookie Consent ===
Contributors: uzytak
Tags: cookie banner, gdpr, consent mode, cookie consent, privacy
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight cookie banner with Google Consent Mode v2, four categories, script blocking until consent and a settings link. Accessible, 10 languages.

== Description ==

A cookie banner that does the important things right and stays small: one CSS file, one script without jQuery, no external requests.

* **Google Consent Mode v2** — all signals "denied" by default, printed at the very top of `<head>` before any Google tag; a returning visitor's choice is applied right after it, still before the tags. Statistics → analytics_storage; Marketing → ad_storage, ad_user_data, ad_personalization; Preferences → functionality_storage, personalization_storage. Optional ads_data_redaction and url_passthrough.
* **Google tag in the right order** — enter your G-… or GTM-… ID and the plugin loads it right after the consent defaults: only after consent (basic) or at once with cookieless pings (advanced).
* **Four categories** — Necessary (always on), Preferences, Statistics, Marketing. Switch off the ones you do not use.
* **Block scripts and embeds until consent** — `<script type="text/plain" data-category="statistics">` and `<iframe data-uzytak-src="…" data-category="marketing">`. They run the moment the visitor allows the category, without reloading.
* **Refusing is as easy as accepting** — "Accept all" and "Reject all" side by side, same size and colour, plus "Settings" for a choice per category. Nothing is pre-ticked.
* **Change of mind at any time** — a small round button in the corner, the `[uzytak_cookie_settings]` shortcode, or any link to `#uzytak-cookie-settings`. When a visitor takes consent back, the cookies of common analytics and ad tools are removed and the page reloads.
* **Accessible** — real buttons, a dialog with focus trap and Escape, switches with labels, visible focus, 44 px touch targets, WCAG AA contrast; the button text colour adapts to your button colour.
* **Ask again** — after a number of days you choose, or for everyone at once when you add a new tool.
* **For developers** — `uzytakConsent.has( 'statistics' )`, `uzytakConsent.open()`, the `uzytak-consent` window event and the `uzytak_consent_update` dataLayer event for Google Tag Manager.
* **Cache-friendly** — the same HTML for every visitor; the browser decides what to show.

This plugin helps you ask for and respect consent. It does not make a site compliant by itself: you decide which tools you use, block them until consent and describe them in your privacy policy. It is not legal advice.

= 10 languages =

Banner and settings in Deutsch, English, Español, Français, Italiano, Nederlands, Polski, Svenska, Русский, Українська — chosen automatically by the language of the site. Your own texts can replace any of them.

= Pro add-on =

UZYTAK Cookie Consent Pro (separate plugin) scans your pages for known trackers and blocks them automatically (Google Analytics, Tag Manager, Meta Pixel, Hotjar, Microsoft Clarity, TikTok, LinkedIn, YouTube and Vimeo embeds, Google Maps and more), keeps a consent log with CSV export, can show the banner only to visitors from the EU/EEA, UK and Switzerland, adds style presets and a cookie policy template.

== External services ==

The plugin connects to no service by itself.

If you enter a Google tag ID in Settings → Cookie consent, the plugin loads Google's tag from www.googletagmanager.com (gtag.js or gtm.js) on your pages — only after the visitor's consent in "basic" mode, or at once with Consent Mode signals in "advanced" mode. Google's terms: https://policies.google.com/terms — privacy policy: https://policies.google.com/privacy

== Installation ==

1. Install the plugin from Plugins → Add New, or upload the zip, and activate it.
2. Go to Settings → Cookie consent: choose the categories your site uses and, if you want, enter your Google tag ID.
3. Change the scripts of your other tools to `type="text/plain" data-category="…"` (examples on the settings page), or let the Pro add-on do it.
4. Put `[uzytak_cookie_settings]` into your footer or privacy policy.

== Frequently Asked Questions ==

= Does this make my site GDPR compliant? =

No plugin can do that alone. The plugin gives you the tools — consent before cookies, equal accept and reject, withdrawal at any time, Consent Mode signals. Which tools you use and how you describe them is up to you; ask your adviser when in doubt.

= Where is the visitor's choice stored? =

In a first-party cookie `uzytak_cc` in the visitor's browser: the consent version, the allowed categories, the time and a random consent ID. Nothing is sent anywhere by the free plugin.

= I use another plugin for Google Analytics. =

Leave the Google tag ID empty. Consent Mode defaults still come first, as long as the other plugin prints its tag in the normal way through wp_head. If it hardcodes the tag above wp_head in the theme, move it below or enter the ID here instead.

= Will the banner show to logged-in users? =

Yes, on the front end. It never shows in the admin.

== Screenshots ==

1. Banner at the bottom.
2. Settings dialog with the categories.
3. Settings page.

== Source code ==

All code is included in readable form (assets/head.js, assets/consent.js, assets/consent.css). There is no build step and no minified or third-party code.

== Changelog ==

= 1.0.0 =
* First release: banner, four categories, Google Consent Mode v2, script and embed blocking, settings link and button, 10 languages.
