Description
NB Cookie Consent provides cookie consent functionality for WordPress websites with script blocking capabilities.
Features:
* Accept & Decline cookie buttons (GDPR-friendly)
* WordPress script blocking until consent
* One-click Cookie Policy page generator
* Full RTL support (Arabic, Hebrew, Persian & more)
* Banner customization (colors, positioning, button text)
* Custom button text – translate to any language
* Admin testing tools to verify blocking
* Debug mode for developers
* Cookie consent revocation shortcode [nb_cookie_revocation]
* Optional floating “Cookie settings” icon – a small, unobtrusive round cookie icon that reopens the banner so visitors can change or withdraw consent anytime; shown only after they’ve accepted/declined (off by default; choose bottom-left/right)
* Accessibility Ready (WCAG) – ARIA support, keyboard navigation, screen-reader friendly
* Cache Plugin Compatible – Works with WP Rocket, LiteSpeed, W3 Total Cache & more
* WP Consent API compatible – shares consent state with other consent-aware plugins
* WooCommerce-aware – with the free WP Consent API plugin, WooCommerce Order Attribution (sourcebuster) cookies also wait for consent (the plugin prompts you to set it up)
* No page reload – consent takes effect instantly without reloading the page
* Google Consent Mode v2 – signals consent to Google tags (GA4, Google Ads, Tag Manager): storage denied by default, granted on Accept – works even for Google snippets hardcoded in your theme
* Translation ready – fully translatable into any language (standard gettext); ships with complete Hebrew and Russian translations, and WordPress.org community translations load automatically
Blocked Scripts (those loaded through WordPress / enqueued; tracking snippets hardcoded directly into your theme — such as a pasted Meta Pixel or chat widget — require the Pro version):
* Google: Analytics (GA4, UA), Tag Manager, Site Kit
* Meta: Facebook Pixel, Facebook Events
* Analytics: MonsterInsights, ExactMetrics, Yoast GA
* Behavior: Hotjar, FullStory, LogRocket, Heap
* Marketing: Mixpanel, Segment, Amplitude
* Chat Widgets: Intercom, Zendesk, Tawk.to, Crisp, Drift
* + Many more automatically detected via WordPress handles
Pro Version Available:
Upgrade to NB Cookie Consent Pro for additional features:
* Granular Consent Mode v2 – separate Analytics vs Marketing consent signals (basic Consent Mode v2 is included free)
* Smart Script Blocking – blocks even hardcoded scripts
* WPML / Polylang Integration – Per-visitor banner language on multilingual sites + 6 built-in languages (the free version is fully translatable via gettext)
* Automatic Scanner & Cookie Categorization
* Consent Dashboard (Analytics)
* Premium Designs – 6 layouts
* Priority support
Use Cases:
* WordPress sites needing cookie consent
* RTL language websites (Arabic, Hebrew, Persian)
* Basic privacy compliance requirements
Design:
LTR & RTL support ready out of the box.
Technical Details
Script Blocking Method:
Uses WordPress’s script_loader_tag filter to block tracking scripts at the server level until user consent.
Supported Scripts:
* google-analytics
* googleanalytics
* gtag
* gtm
* google-tag-manager
* facebook-pixel
* fbpixel
Browser Compatibility:
* Chrome 70+
* Firefox 65+
* Safari 12+
* Edge 79+
Performance:
* Minimal impact on page load speed
* Efficient consent checking
* Clean, lightweight code
Privacy Policy
This plugin stores user consent in a cookie named nb_cookie_consent for 365 days. No personal data is transmitted to external servers. The plugin only enables/disables tracking scripts based on user consent.
Support
For support, please use the WordPress.org support forums.
For priority support and advanced features, consider upgrading to NB Cookie Consent Pro.
Legal Notice
This plugin provides a technical tool for implementing cookie consent.
The author does not provide legal advice and bears no responsibility for any damage, fine, or claim arising from the use of this plugin.
It is strongly recommended to consult with a qualified legal expert to ensure compliance with applicable privacy and cookie regulations.
Screenshots






Installation
- Upload the plugin files to
/wp-content/plugins/nb-cookie-consent/ - Activate the plugin through the ‘Plugins’ screen in WordPress
- Go to Settings Cookie Consent to configure the banner
- Test the blocking functionality using the admin testing tools
FAQ
-
Does this plugin actually block tracking scripts?
-
Yes! Unlike cosmetic consent banners, this plugin uses WordPress’s
script_loader_tagfilter to block tracking scripts until user consent is obtained. -
What’s the difference between standard and Pro versions?
-
The standard version includes Accept & Decline buttons, blocks WordPress-enqueued tracking scripts, and is fully translatable (gettext; ships Hebrew + Russian). The Pro version adds granular per-category consent, smart script blocking (hardcoded/inline scripts), WPML/Polylang per-visitor language with 6 built-in translations, a cookie scanner, and a consent analytics dashboard.
-
Does this help with privacy regulations?
-
This plugin blocks WordPress-enqueued tracking scripts until user consent. For specific legal compliance questions, consult with a qualified legal professional.
-
Yes, you can customize colors, positioning, and display type (banner/modal) in the admin settings.
-
Does it work with caching plugins?
-
Yes. Consent is applied in the browser and the page HTML is identical for every visitor (tracking scripts are always rendered inert server-side), so blocking works correctly even with full-page caching such as WP Rocket, LiteSpeed, and W3 Total Cache.
-
Place the shortcode [nb_cookie_revocation] on your Privacy Policy page or any other page. When users click it, their consent is reset and the cookie banner will reappear.
Shortcode attributes:
* text – Custom button text (default: “Reset Cookie Consent”)
* style – “button” or “link” (default: “button”)
* class – Custom CSS class (default: “nb-cookie-revoke-btn”)Example: [nb_cookie_revocation text=”Withdraw My Consent” style=”link”]
Reviews
There are no reviews for this plugin.
Contributors & Developers
“NB Cookie Consent” is open source software. The following people have contributed to this plugin.
Contributors“NB Cookie Consent” has been translated into 2 locales. Thank you to the translators for their contributions.
Translate “NB Cookie Consent” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.3.0
- Added: Google Consent Mode v2 (basic) – signals consent to Google tags (GA4, Google Ads, Tag Manager) so they respect the visitor’s choice (storage denied by default, granted on Accept), even for Google snippets hardcoded in the theme. Enabled by default on new installs; per-category control remains Premium.
- Added: Optional floating “Cookie settings” icon – a small round cookie-icon button (icon-only, like CookieYes/Cookiebot/OneTrust) that reopens the banner to change/withdraw consent (GDPR withdrawal symmetry). Shown only after the visitor has made a choice (hidden while the banner is still asking). Off by default; bottom-left or bottom-right.
- Added: Full translation support (i18n) – the plugin is now fully translatable into any language via standard gettext (.pot included), and ships with complete Hebrew and Russian translations. WordPress.org community translations are delivered automatically.
- Added: WP Consent API support – consent choices are now shared with other consent-aware plugins (wp_set_consent / wp_has_consent)
- Added: No page reload on consent – accepting now activates previously blocked scripts instantly, without reloading the page
- Added: Developer filter
nb_cookie_consent_blocked_handlesto customize which script handles are treated as trackers - Added: WooCommerce compatibility – Order Attribution (sourcebuster / sbjs_ cookies) respects cookie consent via the WP Consent API (recommended for WooCommerce stores): no tracking cookies before consent, recorded after, checkout never breaks, and no “sbjs is undefined” error
- Added: Cache/optimization compatibility – the consent script is excluded from JS delay/defer/minify/combine in WP Rocket, LiteSpeed, SG Optimizer and Autoptimize (prevents the banner silently breaking)
- Changed: Default banner text now uses explicit opt-in wording (click Accept/Decline) instead of implied consent
- Changed: Clarified that the free version is fully translatable (Hebrew + Russian bundled, English fallback) – the Pro multi-language feature is specifically WPML/Polylang per-visitor language + built-in professional translations
- Changed: Tested up to WordPress 7.0
1.2.1
- Fixed: Cache plugin compatibility – banner now works correctly with WP Rocket, LiteSpeed, etc.
- Fixed: Escape key behavior respects overlay mode setting
- Improved: Accessibility – added ARIA attributes for screen readers
- Improved: Scanner messaging – clearer feedback for hardcoded scripts detection
1.2.0
- Added: One-click Cookie Policy page generator with auto-fill URL
- Improved: Better LTR & RTL support
1.1.9
- Fixed: Banner fallback now uses wp_footer for valid HTML compliance
- Added: “Restore Defaults” button for colors and font size settings
- Changed: Decline button enabled by default for GDPR compliance
- Improved: Cleaner description text (removed mixed language in English version)
1.1.8
- Added: Decline Cookies button – users can now accept OR decline (GDPR-friendly)
- Added: Custom “Decline Button Text” setting – translate to any language
- Added: Decline button color customization
- Updated: Premium features list
1.1.7
- Initial WordPress.org release
- Accept & Decline cookie buttons
- WordPress script blocking (35+ tracking services)
- Full RTL support (Arabic, Hebrew, Persian & more)
- Custom button text settings
- [nb_cookie_revocation] shortcode for consent withdrawal
- Admin testing tools
