PHPackages                             imagewize/simple-cookie-consent - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. imagewize/simple-cookie-consent

Abandoned → [imagewize/warder-cookie-consent](/?search=imagewize%2Fwarder-cookie-consent)Wordpress-plugin[Utility &amp; Helpers](/categories/utility)

imagewize/simple-cookie-consent
===============================

GDPR-compliant cookie consent banner with category management and floating preferences toggle.

v2.1.2(3w ago)21671[1 PRs](https://github.com/imagewize/warder-cookie-consent/pulls)GPL-2.0-or-laterPHPPHP &gt;=8.0

Since Apr 4Pushed 2w ago2 watchersCompare

[ Source](https://github.com/imagewize/warder-cookie-consent)[ Packagist](https://packagist.org/packages/imagewize/simple-cookie-consent)[ RSS](/packages/imagewize-simple-cookie-consent/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (22)Versions (42)Used By (0)

Warder Cookie Consent
=====================

[](#warder-cookie-consent)

A lightweight plugin that implements GDPR-compliant cookie consent functionality for WordPress websites using the [vanilla-cookieconsent](https://github.com/orestbida/cookieconsent) library.

Features
--------

[](#features)

- 🚀 Lightweight and fast
- 🌐 Multi-language support
- 🎨 Customizable appearance
- 🔒 GDPR-compliant cookie management
- 🔁 Floating preferences toggle button — lets users revisit consent choices at any time
- 📱 Fully responsive design
- 🧩 Easy integration with WordPress

Installation
------------

[](#installation)

### Method 1: Using WordPress Admin

[](#method-1-using-wordpress-admin)

1. Download the plugin ZIP file from the releases page
2. Go to your WordPress admin panel
3. Navigate to Plugins &gt; Add New &gt; Upload Plugin
4. Choose the downloaded ZIP file and click "Install Now"
5. Activate the plugin

### Method 2: Manual Installation

[](#method-2-manual-installation)

1. Download the plugin ZIP file
2. Extract the ZIP file
3. Upload the extracted folder to your `/wp-content/plugins/` directory
4. Activate the plugin through the WordPress admin panel

### Method 3: Using Composer

[](#method-3-using-composer)

You can also install the plugin using Composer:

```
composer require imagewize/warder-cookie-consent
```

Usage
-----

[](#usage)

After activation, the cookie consent banner will automatically appear on your website. Configure the settings from the WordPress admin panel at Settings &gt; Warder Consent.

Configuration
-------------

[](#configuration)

You can customize the plugin through the admin interface:

1. Navigate to Settings &gt; Warder Consent in your WordPress dashboard
2. Configure the following settings:
    - Language and general behavior
    - Banner title and description
    - Button text and actions
    - Privacy policy link
    - **Cookie categories and patterns** (NEW!)

### Preferences Toggle Button

[](#preferences-toggle-button)

A floating cookie icon button is rendered in the page footer, giving visitors a persistent way to reopen the preferences modal and change their consent choices at any time.

- **Enable/disable** the button via the "Preferences Toggle Button" checkbox in General Settings
- **Position** it in any corner: Bottom Right (default), Bottom Left, Top Right, Top Left
- The button only appears when the plugin is enabled and the toggle option is active

### Cookie Categories Management

[](#cookie-categories-management)

The plugin allows you to manage cookie categories and patterns directly through the admin interface:

- **Add new cookie categories** like Marketing or Preferences
- **Define specific cookies** to block within each category
- **Use regular expressions** to match multiple cookies with similar names
- **Automatically clear cookies** when consent is withdrawn

This means you can easily configure which cookies to block and when to allow them, all without editing any code.

### Cookie Categories

[](#cookie-categories)

The default configuration includes:

- **Necessary cookies**: Always enabled, required for basic website functionality. Pre-populated with WordPress core cookies (`wordpress_logged_in_*`, `wordpress_sec_*`, `wordpress_test_cookie`, `wp-settings-*`) and WooCommerce session &amp; cart cookies (`wp_woocommerce_session_*`, `woocommerce_cart_hash`, `woocommerce_items_in_cart`, `woocommerce_recently_viewed`).
- **Analytics cookies**: Optional tracking and analytics cookies, pre-populated with patterns for Google Analytics (`/^_ga/`, `_gid`, `_gat`), Matomo (`/^_pk_/`, `/^mtm_/`), and SourceBuster (`/^sbjs_/`).

> Plausible Analytics is cookieless by design, so it needs no patterns here — there are no cookies to clear.

Usage Examples
--------------

[](#usage-examples)

### Blocking Google Analytics Until Consent

[](#blocking-google-analytics-until-consent)

Add your Google Analytics script with the `data-category` attribute:

```

  // Your Google Analytics code here

```

The script won't execute until the visitor accepts analytics cookies.

### Blocking Matomo Until Consent

[](#blocking-matomo-until-consent)

Gate the Matomo tracking snippet the same way:

```

  var _paq = window._paq = window._paq || [];
  // Your Matomo tracking code here

```

The matching `/^_pk_/` and `/^mtm_/` patterns in the analytics category clear Matomo's cookies if consent is later withdrawn.

### Automatic Script Blocking

[](#automatic-script-blocking)

The plugin automatically blocks a set of known WordPress script handles before analytics consent is given — no `data-category` attributes needed on those scripts. The built-in list covers:

Script handleScript`sourcebuster-js`WooCommerce SourceBuster (sets `sbjs_*` cookies)`wc-order-attribution`WooCommerce order attributionTo add more scripts, use the `warder_blocked_scripts` filter:

```
add_filter( 'warder_blocked_scripts', function( $scripts ) {
    $scripts['my-tracking-script'] = 'analytics';
    return $scripts;
} );
```

#### Common examples

[](#common-examples)

```
// Slimstat Analytics
$scripts['wp_slimstat'] = 'analytics';

// MonsterInsights
$scripts['monsterinsights-frontend'] = 'analytics';
```

### Managing Third-party Cookies

[](#managing-third-party-cookies)

The plugin automatically handles third-party cookies by:

1. Preventing scripts from loading until consent is given
2. Clearing cookies if consent is withdrawn

For detailed implementation guides, see [`docs/dev.md`](docs/dev.md).

Contributing
------------

[](#contributing)

Want to build from source, set up a development environment, or submit changes? See [`CONTRIBUTING.md`](CONTRIBUTING.md). For a deeper technical reference, see [`docs/dev.md`](docs/dev.md).

License
-------

[](#license)

This project is licensed under GPLv2 or later - see the LICENSE file for details.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance96

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Recently: every ~0 days

Total

22

Last Release

25d ago

Major Versions

v1.5.2 → v2.0.02026-05-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/01563ca58ee6cd8347183741d139584749756ca5e02cd062915ca0b5edcc8057?d=identicon)[jasperf](/maintainers/jasperf)

---

Top Contributors

[![jasperf](https://avatars.githubusercontent.com/u/344138?v=4)](https://github.com/jasperf "jasperf (170 commits)")[![jakelodge](https://avatars.githubusercontent.com/u/10651420?v=4)](https://github.com/jakelodge "jakelodge (1 commits)")

---

Tags

cookie-consentgdprwordpress-pluginpluginwordpresscookiegdprcookie-consentconsentcookie bar

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/imagewize-simple-cookie-consent/health.svg)

```
[![Health](https://phpackages.com/badges/imagewize-simple-cookie-consent/health.svg)](https://phpackages.com/packages/imagewize-simple-cookie-consent)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[statikbe/laravel-cookie-consent

Cookie consent modal for EU

219416.5k](/packages/statikbe-laravel-cookie-consent)[codingfreaks/cf-cookiemanager

Manage cookies, scripts, and GDPR compliance on your Typo3 website with CodingFreaks Typo3 Cookie Manager. Customize cookie banners, streamline workflow, and enhance user experience. Ensure GDPR compliance and take control of cookie management with our Typo3 cookie management extension. Visit the official Typo3 Documentation page to learn more.

1829.2k](/packages/codingfreaks-cf-cookiemanager)[bramdeleeuw/cookieconsent

GDPR compliant cookie bar and consent checker

1511.6k2](/packages/bramdeleeuw-cookieconsent)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
