NetCookies
Free cookie consent for UK and EU sites.
Install in
NetCookies asks your visitors before your site sets any optional cookies, and means it. Analytics and advertising tags stay switched off until someone says yes, and if they change their mind later, the cookies are deleted.
It is built for UK and EU sites, following the ICO’s guidance under PECR and UK GDPR: Reject is as easy as Accept, nothing is ticked in advance, and visitors can change their choice at any time.
Why NetCookies
- Completely free. Every feature on this page, with no page-view limits, no account to create and no “upgrade to unlock blocking”.
- Fair by design. Accept all and Reject all sit side by side and look identical. No pre-ticked boxes, no hidden reject link, no cookie wall.
- Blocks for real. Scripts wait inside inert templates until a visitor agrees to their category, so nothing runs early. Turn a category off and its cookies are removed.
- Google Consent Mode v2 built in. Paste your Google Analytics 4 or Tag Manager ID and NetCookies sends Google the consent signals it needs, in basic or advanced mode.
- Works with the WP Consent API. If the free WP Consent API plugin is installed, NetCookies tells it about every choice, so plugins that follow it, such as WooCommerce Order Attribution, wait for your visitors to agree.
- Works with page caching. The banner is drawn in the browser, so every visitor can be served the same cached page.
- Finds your cookies. Scan your site to see the cookies it sets and any tracking that loads before consent, with advice on how to fix each one. Cookies made by JavaScript are picked up as you browse your own site while logged in.
- A cookie list that writes itself. Put [netcookies_declaration] on a page for a tidy table of every cookie, grouped by category, with plain-English descriptions of nearly 40 common cookies.
- Proof of consent. Every choice is recorded against a random ID that only the visitor holds, scrambled so it can’t be traced back to them. No IP addresses. Export to CSV whenever you need it.
- Light. One small script and stylesheet, no jQuery. NetCookies itself makes no external requests from your visitors’ browsers; only the tracking services you add are loaded, after consent (see External services).
- Accessible. Keyboard friendly, screen-reader labels, proper switches, focus kept inside the settings panel and 44px touch targets.
- Respects Global Privacy Control. If a browser sends the “do not share” signal, marketing cookies stay off unless the visitor switches them on.
Part of the Netchameleon Suite
NetCookies is part of the Netchameleon Suite, a family of WordPress plugins by Netchameleon that work together. It knows the cookies that other Net plugins set, such as NetPolls and NetBookings, and lists them for you automatically. Every Net plugin shares one Netchameleon Suite menu in your dashboard.
External services
NetCookies does not connect to any outside service unless you set one up. These are the services it can use:
Google Analytics 4 and Google Tag Manager
Used only if you enter a Google Analytics measurement ID or a Tag Manager container ID on the Categories & scripts screen. NetCookies then adds Google’s tag (gtag.js from www.googletagmanager.com, or gtm.js for Tag Manager) to your pages. In basic Consent Mode (the default) the tag loads only after a visitor allows Analytics (or, for Tag Manager, Analytics or Marketing). In advanced Consent Mode the tag loads on every page and sends Google cookieless pings with the visitor’s consent state until they choose. Google receives the page address, browser details, the visitor’s IP address and, once consent is given, analytics cookie identifiers.
Google terms of service: https://policies.google.com/terms
Google Analytics terms: https://marketingplatform.google.com/about/analytics/terms/us/
Google privacy policy: https://policies.google.com/privacy
Meta (Facebook) Pixel
Used only if you enter a Meta Pixel ID. NetCookies adds Meta’s pixel script (from connect.facebook.net) after a visitor allows Marketing cookies. Meta receives the page address, browser details, the visitor’s IP address and its own cookie identifiers, and records a page view.
Meta Business Tools terms: https://www.facebook.com/legal/terms/businesstools
Meta privacy policy: https://www.facebook.com/privacy/policy/
Microsoft Clarity
Used only if you enter a Clarity project ID. NetCookies adds Clarity’s script (from www.clarity.ms) after a visitor allows Analytics cookies. Clarity receives the page address, browser details, the visitor’s IP address and recordings of how the page is used.
Microsoft Clarity terms: https://clarity.microsoft.com/terms
Microsoft privacy statement: https://privacy.microsoft.com/privacystatement
Site scan (your own site only)
The “Scan my site” button on the Cookie list tab loads up to four pages of your own site (from your server to your server) and looks for cookies and for the addresses of well-known services such as Google Analytics, YouTube or Stripe in the page code. It never contacts those services: their names and addresses are only a list of patterns to look for, so the scan can tell you what your site already loads. Nothing is sent outside your site.
Netchameleon plugin list (dashboard only)
Used only if you tick “Keep the list up to date” on the Banner tab. It is off by default; until then the “More from Netchameleon” box uses a list built into the plugin. When it is on, your site downloads a short list of Net plugins from https://netchameleon.co.uk/netchameleon-suite.json about once a week, to show in the sidebar of the NetCookies settings page. The request is made by your server, not by visitors. It sends no information about your site beyond what any web request includes (your server’s IP address and a “NetCookies” user agent).
Netchameleon privacy policy: https://netchameleon.co.uk/privacy-policy/
Developer notes
JavaScript:
NetCookies.hasConsent( 'analytics' )– true or falseNetCookies.getConsent()– all categories, or null before a choiceNetCookies.open()– open the settings panelNetCookies.set( { analytics: true } ),NetCookies.acceptAll(),NetCookies.rejectAll()- Events on document:
netcookies:readyandnetcookies:change(detail: consent, action, revoked)
PHP: netcookies_has_consent( 'analytics' ) (not reliable on cached pages; use the JavaScript API there).
Categories: necessary, functional, analytics, marketing.
Filters: netcookies_settings, netcookies_active, netcookies_config, netcookies_consent_mode, netcookies_category_snippets, netcookies_blocked_handles, netcookies_known_cookies, netcookies_declaration_rows, netcookies_scan_services, netcookies_scan_pages, netcookies_rate_limit, netcookies_showcase_url.
Actions: netcookies_loaded.
Settings page hooks, for add-ons: net_netcookies_settings_tabs (filter, add tabs), net_netcookies_settings_cards_{tab} (action, add cards to a tab), net_netcookies_save_settings (action, save them), net_netcookies_sidebar (filter, sidebar boxes) and net_netcookies_is_pro (filter).
Netchameleon plugins can declare their cookies with netcookies_known_cookies:
add_filter( 'netcookies_known_cookies', function ( $list ) { $list[] = array( 'name' => 'my_cookie', 'category' => 'functional', 'provider' => 'My plugin', 'purpose' => 'Remembers …', 'duration' => '1 year', 'type' => 'cookie' ); return $list; } );
Shortcodes: [netcookies_settings label="Cookie settings"] and [netcookies_declaration] (add status="no" to hide the “your current choice” line).
Written by Joobi from the project's own listing. See the source page
1.0.9
- The plugin is now registered with the Netchameleon menu on init, so translations are no longer loaded too early (no _load_textdomain_just_in_time notice with WP_DEBUG on).
- Fixed a PHP notice on the NetCookies settings page: the page title was missing once its menu moved under Netchameleon. Shared hub updated to 0.7.2.
- The shared admin stylesheet handle is now netchameleon-admin.
- readme: explained that the site scan only requests your own pages.
1.0.8
- Add-ons can now ask the banner to wait briefly before it appears (window.NetCookiesGate), so NetCookies Pro’s location rules can decide what each visitor sees. Without an add-on nothing changes: the banner works exactly as before.
- NetCookies.hasChosen() only reports a real choice the visitor made.
1.0.7
- WP Consent API support. When the WP Consent API plugin is installed, NetCookies registers as the consent banner, sets the consent type to opt-in and passes every choice to it without a page reload (Functional preferences, Analytics statistics and statistics-anonymous, Marketing marketing). Plugins that respect the API, including WooCommerce Order Attribution, now wait for consent before setting cookies. No change if the API plugin isn’t installed.
- WooCommerce’s sbjs_ order attribution cookies are now listed under Marketing, the category WooCommerce asks for, so switching Marketing off removes them.
- Added the WP Consent API’s wp_consent_ cookies to the cookie list as essential.
1.0.6
- The Netchameleon menu and Suite Overview now use the Netchameleon chameleon icon, coloured to match your admin colour scheme. Shared hub updated to 0.7.1.
1.0.5
- Renamed the shared plugin family to the Netchameleon Suite. The shared admin menu is now called “Netchameleon” (page title “Netchameleon Suite”) and sits between Tools and Settings. Shared hub updated to 0.7.0: class Netchameleon_Suite, menu slug ncsuite, filters netchameleon_suite_plugins, netchameleon_suite_catalogue, netchameleon_suite_menu_position and netchameleon_suite_fold_menus. The overview’s list of other plugins is now headed “More from Netchameleon”, and plugin links point to each plugin’s own page and to netchameleon.co.uk/plugins/.
1.0.4
- Suite menu: shared hub updated to 0.6.1, so PRO badges show in the tab bar and admin menu.
1.0.3
- Suite menu: the shared menu now sits just above Settings in the WordPress admin menu, instead of directly under Dashboard. Shared hub updated to 0.6.0.
1.0.2
- Suite menu: shared hub updated to 0.5.2. The retired SMTP mailer is no longer listed (NetCampaigns handles sending), and every product now uses its one-word name, e.g. NetClassified and NetConnect.
1.0.1
- Netchameleon Suite: Netchameleon Campaigns is now listed under its new name, NetCampaigns.
1.0.0
- First public release.
- Cookie banner in three styles (bar, corner box, centred box) with Accept all and Reject all side by side, plus a settings panel with a switch for each category.
- Script blocking: built-in Google Analytics 4, Tag Manager, Meta Pixel and Microsoft Clarity integrations, your own scripts per category, holding back scripts other plugins enqueue, and placeholders for embeds.
- Google Consent Mode v2, basic and advanced.
- Cookie scan, a library of common cookies and the [netcookies_declaration] cookie list.
- Consent record with search, CSV export and automatic clean-up.
- Global Privacy Control support.
- Netchameleon Suite: NetCookies appears in the shared Netchameleon Suite menu and Overview, and lists cookies set by other Net plugins automatically.
- One settings page with tabs (Banner, Categories & scripts, Cookie list, Consent record, Help), laid out like every Netchameleon Suite plugin.
Follow this listing's changes (Atom feed)