Description
cookies +GDPR is a WordPress plugin for managing cookie consent and visitor preferences, designed with the European GDPR and cookie privacy requirements in mind. Visitors can accept, reject, or individually select optional cookie categories.
- Necessary, preferences, analytics, and marketing consent categories.
- Reject all, save selection, and accept all actions.
- Visitors can change or withdraw their consent at any time.
- Optional Google Analytics 4 integration activated according to analytics consent.
- WooCommerce support, including essential shopping-cart and checkout cookies and optional order-attribution controls.
- Editable cookie policy displayed in a modal or on a page; plugin updates do not automatically overwrite a customized policy.
- Configurable colors, typography, layout, and live admin preview.
- Built-in default translations for Czech, Slovak, English, German, Spanish, French, Italian, and Polish.
- Optional, disabled-by-default author credit link.
The plugin helps WordPress site owners manage visitor consent and implement GDPR-oriented cookie controls. Its automatic blocking applies to supported integrations and scripts explicitly configured for its consent categories; scripts independently injected by other plugins, themes, or tag managers must be configured separately.
Third-party service: When GA4 is enabled and a visitor accepts analytics cookies, the plugin loads Google’s gtag.js script from www.googletagmanager.com and sends analytics events to Google. No GA4 script is loaded by this plugin before acceptance.
External services
Google Analytics 4 (Google LLC) is optional. The plugin does not connect to Google Analytics unless the site administrator configures a valid GA4 Measurement ID and the visitor accepts analytics cookies. After acceptance, the visitor’s browser downloads the Google tag JavaScript library from https://www.googletagmanager.com/gtag/js and sends measurement data to Google’s analytics infrastructure. This can include the visitor’s IP address, browser and device information, page URL, referrer, and interaction/measurement events, as processed by Google. The GA4 Measurement ID is included in the script request. Google may use cookies and similar technologies for analytics as described in its documentation. If the visitor rejects analytics cookies, this plugin does not load the Google tag library or send GA4 events. Other plugins or themes may independently send data to Google and are not controlled by cookies +GDPR.
Google Analytics Terms of Service: https://marketingplatform.google.com/about/analytics/terms/us/
Google Privacy Policy: https://policies.google.com/privacy
Google Analytics data safeguards: https://support.google.com/analytics/answer/6004245
The optional author credit is a normal hyperlink to https://www.jpgweb.cz/ and is disabled by default. cookies +GDPR does not send any data to this site automatically. Clicking the link navigates to the external website.
Source code
The complete human-readable JavaScript source code is included in assets/front.js and assets/admin.js. No build step, compilation, or minification is required to reproduce these files. The plugin includes no bundled third-party JavaScript libraries.
1.6.2 BETA
- Expanded WooCommerce attribution script detection to known handles and filenames. Experimental; site-specific testing required.
- Updated settings heading to cookies +GDPR.
1.6.1 BETA
- Public name: cookies +GDPR; existing jpg-cookie directory, settings and update slug retained for migration.
- Optional WooCommerce Sourcebuster/Order Attribution script deferral until analytics consent, for known WordPress-enqueued handles only.
- Fixed GA4 activation from inadvertently resetting category-specific consent.
- Experimental integration: test WooCommerce order attribution, cart, checkout and caching before production use.
- No automatic universal third-party script blocker; no legal compliance guarantee.
1.6.0
- Volitelné kategorie souhlasu: analytické, marketingové a funkční.
- Google Consent Mode v2 reaguje na jednotlivé kategorie.
- Podpora deklarativně blokovaných skriptů (data-jpgc-category).
- Ukládání voleb po kategoriích, zachování starších rozhodnutí.
- Upozornění: plugin automaticky neblokuje všechny skripty třetích stran; otestujte web.
1.5.6
- Security hardening: validate stored consent timestamps and GA4 identifiers.
- Sanitize stored settings before frontend output and restore bounded number input attributes.
- Translate policy text nodes without replacing the existing policy DOM.
1.5.5
- Make frontend JavaScript source human-readable and document its source availability.
- Correct the WordPress.org contributor username.
- Document the optional Google Analytics external service and its data transfers.
1.5.4
- Align WordPress.org readme metadata with the tested WordPress 7.1 series.
- Set the minimum PHP requirement to 8.1; runtime syntax checks were performed on PHP 8.4 only.
- Preserve the optional background blur and voluntary author credit.
1.5.1
- Public distribution metadata and readme.
- Author credit requires explicit opt-in; previously saved settings do not enable it.
- Disable website-lock overlay, including on upgrades.
- Restrict policy URLs to HTTP(S).
- Avoid flushing the entire WordPress object cache.
- Correct the version shown in the admin UI.
Installation
- Upload the ZIP through Plugins > Add New > Upload Plugin.
- Activate cookies +GDPR.
- Configure it under Settings > cookies +GDPR (menu label may differ).
- Verify consent behavior in a private browser window and review any existing tracking scripts.
FAQ
Does this block every tracking script?
No. It controls only its own optional GA4 loader.
Can visitors reject analytics?
Yes. Visitors can reject analytics and later change their choice.
Is the author link required?
No. It is disabled by default and only shown after explicit opt-in by the site administrator.
Changelog
1.7.2
- Updated version metadata and changelog for the WordPress.org release.
- No changes to consent handling, GA4, WooCommerce, or frontend behavior.
1.7.1
- Added a narrowly scoped coding-standards suppression for the inert WooCommerce attribution script placeholder.
- Preserved consent-dependent attribution loading.
1.7.0
- Stable release based on 1.6.11 BETA.
- Consent-aware optional Google Analytics 4 integration and consent withdrawal handling.
- WooCommerce cart and order-attribution consent controls.
- Updated plugin description and version metadata.
