Title: Koci Cookie
Author: kocimedia
Published: <strong>November 25, 2026</strong>
Last modified: November 25, 2026

---

Search plugins

![](https://ps.w.org/koci-cookie/assets/banner-772x250.png?rev=3824675)

![](https://ps.w.org/koci-cookie/assets/icon-256x256.png?rev=3824675)

# Koci Cookie

 By [kocimedia](https://profiles.wordpress.org/kocimedia/)

[Download](https://downloads.wordpress.org/plugin/koci-cookie.1.3.0.zip)

 * [Details](https://wordpress.org/plugins/koci-cookie/#description)
 * [Reviews](https://wordpress.org/plugins/koci-cookie/#reviews)
 *  [Installation](https://wordpress.org/plugins/koci-cookie/#installation)
 * [Development](https://wordpress.org/plugins/koci-cookie/#developers)

 [Support](https://wordpress.org/support/plugin/koci-cookie/)

## Description

Koci Cookie shows a cookie banner and makes sure that tracking codes and embeds 
only run after the visitor agreed – whichever plugin or theme adds them.

#### Features

 * **Prior blocking** – recognised tracking codes (Google Analytics / Ads / Tag 
   Manager, Meta Pixel, Microsoft Clarity, Hotjar, TikTok, LinkedIn, Pinterest, 
   X, Matomo, Yandex …) and embeds (YouTube, Vimeo, Google Maps, Spotify …) are 
   deactivated in the served HTML until consent. Blocked embeds get a placeholder
   with an “Allow and load” button. The output does not depend on the visitor, so
   it works with page caching.
 * **Two layers** – “Accept all” and “Reject all” with equal weight on the first
   layer, a settings panel with a switch per category and the list of cookies on
   the second. No optional category is pre-ticked.
 * **Google Consent Mode v2** (basic or advanced), **Microsoft UET Consent Mode**
   and **WP Consent API** support.
 * **Consent log** – random consent ID, time, decision, settings revision and page;
   the IP address is stored anonymised (IPv4 last byte zeroed) or not at all, the
   browser only if you turn it on. CSV export and automatic retention period (3 
   years by default). Visitors see their own consent ID.
 * **Withdraw at any time** – floating button, `[koci_cookie_settings]` shortcode
   or a `#koci-cookie-settings` link. When consent is withdrawn, the cookies of 
   the category are deleted.
 * **Design** – box, bar, popup or sidebar, 6 positions, colours and colour schemes,
   fonts, radius, animation and logo, with a live preview in the admin.
 * **Every text can be edited**, and translated with Polylang or WPML. The default
   texts and the admin screens are translatable on translate.wordpress.org.
 * **Automatic cookie scan** – the main pages of the site are loaded in the admin
   as if all cookies were accepted, and the cookies found are classified with a 
   built-in database of about 100 cookies (provider, category, purpose, expiry).
   Third-party cookies that the browser does not let us read are added from the 
   detected services.
 * **Integrations by ID** – Google Analytics 4, Google Ads, Google Tag Manager, 
   Meta Pixel, Microsoft Clarity and Hotjar are loaded by the plugin after consent,
   and their cookies are added to the cookie list automatically.
 * Consent validity, asking everyone again (revision), Global Privacy Control signal,
   robots, excluded pages, import / export of the settings.
 * **Compliance check** in the admin, based on the EDPB guidelines.

The plugin is a technical tool. The site owner is responsible for the content of
the privacy policy and for the accuracy of the cookie list.

#### Privacy

 * The consent cookie `koci_cookie_consent` stores the decision (random consent 
   ID, accepted categories, settings revision and time) for the configured period(
   180 days by default).
 * The consent log is stored in your own database (table `{prefix}koci_cookie_log`)
   and sent to your own site (`/wp-json/koci-cookie/v1/consent`). It is deleted 
   automatically after the retention period.
 * A suggested privacy policy text is added to Settings > Privacy > Policy guide.
 * The plugin itself does not send any data to third parties. See “External services”
   for the optional integrations.

#### External services

The plugin connects to the following services only when you enter their ID on the
Integrations tab. Their scripts are loaded from the provider’s server in the visitor’s
browser, only after the visitor allowed the category of the service (statistics 
or marketing). Exception: with the advanced Google Consent Mode the Google tags (
Analytics, Ads, Tag Manager) load before consent and send cookieless pings without
consent, as described by Google. The scripts send the provider data about the visit(
page address, browser and device data, IP address, and the events of the service).

 * **Google Analytics 4 and Google Ads** (Google tag, `https://www.googletagmanager.
   com/gtag/js`) – visitor statistics and ad conversion measurement. Terms: https://
   policies.google.com/terms – Privacy: https://policies.google.com/privacy
 * **Google Tag Manager** (`https://www.googletagmanager.com/gtm.js`) – loads the
   tags set up in your Tag Manager container. Terms: https://policies.google.com/
   terms – Privacy: https://policies.google.com/privacy
 * **Meta Pixel** (`https://connect.facebook.net/en_US/fbevents.js`) – ad measurement
   and targeting on Meta platforms. Terms: https://www.facebook.com/legal/terms/
   businesstools – Privacy: https://www.facebook.com/privacy/policy/
 * **Microsoft Clarity** (`https://www.clarity.ms/tag/`) – session recordings and
   heatmaps. Terms: https://clarity.microsoft.com/terms – Privacy: https://privacy.
   microsoft.com/privacystatement
 * **Hotjar** (`https://static.hotjar.com/c/hotjar-<site ID>.js`) – visitor behaviour
   analytics. Terms: https://www.hotjar.com/legal/policies/terms-of-service/ – Privacy:
   https://www.hotjar.com/legal/policies/privacy/

The cookie scan only loads pages of your own site and sends nothing to an external
server.

#### For developers

 * JS API: `window.kociCookie.showPreferences()`, `show()`, `getConsent()`, `hasConsent('
   marketing' )`, `acceptAll()`, `rejectAll()`, `onConsent( fn )`.
 * Event: `koci_cookie_consent` on `document` and in the `dataLayer` (GTM trigger)
   on every decision and page load.
 * Manual blocking in a theme: `<script type="text/plain" data-kcc-category="statistics"
   >` (`data-kcc-src` for an external file) and `<iframe data-kcc-src="…" data-kcc-
   category="marketing">`.
 * Shortcodes: `[koci_cookie_settings]` (a link that opens the settings) and `[koci_cookie_list]`(
   the cookie table for the cookie policy).
 * PHP: `koci_cookie_has_consent( 'statistics' )` – use with care with full page
   caching.
 * Filters: `koci_cookie_services` (the service catalogue of the blocking), `koci_cookie_cookie_db`(
   the built-in cookie database), `koci_cookie_block_script` (keep a detected script
   unblocked), `koci_cookie_blocker_enabled`, `koci_cookie_text`, `koci_cookie_config`,`
   koci_cookie_scan_urls`. Action: `koci_cookie_settings_saved`.

## Screenshots

[⌊The banner on the site, with equal "Reject all" and "Accept all" buttons.⌉⌊The
banner on the site, with equal "Reject all" and "Accept all" buttons.⌉[

The banner on the site, with equal “Reject all” and “Accept all” buttons.

[⌊The detailed settings with the categories and the cookie list.⌉⌊The detailed settings
with the categories and the cookie list.⌉[

The detailed settings with the categories and the cookie list.

[⌊The design settings with the live preview.⌉⌊The design settings with the live 
preview.⌉[

The design settings with the live preview.

[⌊The automatic cookie scan with the classified cookies.⌉⌊The automatic cookie scan
with the classified cookies.⌉[

The automatic cookie scan with the classified cookies.

[⌊The consent log with the statistics of the last 30 days.⌉⌊The consent log with
the statistics of the last 30 days.⌉[

The consent log with the statistics of the last 30 days.

## Installation

 1. Install the plugin from the Plugins > Add New screen, or upload the plugin folder
    to `/wp-content/plugins/`, then activate it.
 2. Open Koci Cookie in the admin menu. Set the privacy policy page on the General 
    tab.
 3. On the Categories and cookies tab run the cookie scan, and check the cookie list.
 4. Optional: enter your tracking IDs on the Integrations tab, and adjust the design
    and the texts.

## FAQ

### Does it work with page caching?

Yes. Blocking happens in the HTML for every visitor in the same way, and the decision
is applied in the browser. After saving, the known page caches are cleared.

### Which scripts are blocked?

The scripts and iframes of 20 known services (analytics, advertising pixels, video,
maps, music and social embeds), whichever plugin or theme adds them. You can add
your own rules (text fragment | category) on the Blocking tab, or mark a script 
manually with `type="text/plain" data-kcc-category="…"`.

### Can I use it on a multilingual site?

Yes. The banner texts can be translated with Polylang (Languages > String translations)
or WPML (String Translation).

### How do I add a tracking code that is not on the Integrations tab?

Add it in your theme (or with the plugin that adds it) as usual. Known services 
are blocked automatically; for anything else add a rule on the Blocking tab (text
fragment | category), or mark the script with `type="text/plain" data-kcc-category
="statistics"`. The plugin does not store custom code. Custom CSS for the banner
belongs in Appearance > Customize > Additional CSS or in the styles of the Site 
Editor.

### How can visitors change their decision?

With the floating button (on by default), or with the `[koci_cookie_settings]` shortcode
or a `#koci-cookie-settings` menu link if you turn the button off.

### When do I have to ask everyone again?

When you add a new cookie, service or purpose. Use “Ask everyone for consent again”
on the Tools tab: the banner is shown to every visitor again.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Koci Cookie” is open source software. The following people have contributed to 
this plugin.

Contributors

 *   [ kocimedia ](https://profiles.wordpress.org/kocimedia/)

[Translate “Koci Cookie” into your language.](https://translate.wordpress.org/projects/wp-plugins/koci-cookie)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/koci-cookie/), check
out the [SVN repository](https://plugins.svn.wordpress.org/koci-cookie/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/koci-cookie/) by
[RSS](https://plugins.trac.wordpress.org/log/koci-cookie/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.3.0

 * First public release on WordPress.org.
 * English source texts, translation-ready (translations are delivered by translate.
   wordpress.org).
 * The durations of the cookie list are translatable.
 * Scripts and styles are added with the WordPress script and style functions; every
   input is sanitized where it is read; the first-scan hint is shown on the plugin’s
   own page only.
 * Saving the settings also clears the page cache of Koci Cache 1.1 and later.
 * Removed: the custom script fields (Blocking tab) and the custom CSS field (Appearance
   tab). Code saved in them earlier is no longer added to the site; the Tools tab
   shows it once so that it can be moved, and deletes it on request.
 * Blocking uses the template enhancement output buffer of WordPress, so WordPress
   6.9 or later is required.

#### 1.2.1

 * The privacy and imprint links moved to the settings panel opened with the gear
   icon.

#### 1.2.0

 * Compact banner and settings panel, shorter default texts, one-row buttons on 
   mobile and a gear icon.
 * One-time update of the old default sizes and texts; custom settings are kept.

#### 1.1.0

 * Automatic cookie scan and built-in cookie database.
 * The cookies of the integrations are added to the cookie list automatically.
 * WooCommerce Order Attribution (`sbjs_*`) is blocked until consent.

#### 1.0.0

 * First release.

## Meta

 *  Version **1.3.0**
 *  Last updated **30 minutes ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.9 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [consent](https://wordpress.org/plugins/tags/consent/)[consent mode](https://wordpress.org/plugins/tags/consent-mode/)
   [cookie](https://wordpress.org/plugins/tags/cookie/)[cookie banner](https://wordpress.org/plugins/tags/cookie-banner/)
   [GDPR](https://wordpress.org/plugins/tags/gdpr/)
 *  [Advanced View](https://wordpress.org/plugins/koci-cookie/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/koci-cookie/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/koci-cookie/reviews/)

## Contributors

 *   [ kocimedia ](https://profiles.wordpress.org/kocimedia/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/koci-cookie/)