Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/m7boy/sb-cookie-consent/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
WordPress cookie consent with categories, a cookie inventory, a cookie-policy shortcode, a permanent policy link, a reopen control, and real script/cookie gating. Developed by Software Brewery.
Requirements
- WordPress 6.0+
- PHP 8.0+
Features
- Banner with Necessary / Preferences / Analytics / Marketing
- Per-category toggles and cookie lists (empty categories still shown)
- Accept all, Necessary only, Save choice
- Floating icon to change consent after accept/decline
- Permanent footer link to the cookie policy (not privacy)
- Shortcode
[sb_cookie_policy]for the full inventory on a policy page - Admin cookie registry (name/mask, provider, purpose, duration, WP script handles)
- Blocks mapped scripts until the category is allowed (
type="text/plain"→ activated on consent) - Deletes matching first-party cookies when a category is turned off
- Theme colors by default; manual overrides via color picker
- Helpers:
sb_cookie_consent_allows( 'analytics' ),window.sbCC.has('analytics')
Setup
- Activate SB Cookie Consent.
- Create a page (e.g. “Политика за бисквитки”) and add
[sb_cookie_policy]. - Open Settings → SB Cookie Consent, set the cookie policy URL, and fill the cookie registry.
- For analytics/marketing scripts registered in WordPress, put their script handles on the matching cookie row so they stay blocked without consent.
Front-end API
document.addEventListener('sbCookieConsent', function (event) {
console.log(event.detail.categories);
});
if (window.sbCC && window.sbCC.has('analytics')) {
// load analytics
}
if ( sb_cookie_consent_allows( 'marketing' ) ) {
// output marketing tag
}
Filters
sb_cookie_consent_theme_colors— default banner colors from the themesb_cookie_consent_gated_handles— map ofscript_handle => categorysb_cookie_consent_scan_catalog— extend auto-detect services/cookies
Auto-scan
Settings → SB Cookie Consent → Сканирай и добави автоматично checks script handles, active plugins, and homepage HTML for GA/GTM, Meta Pixel, Hotjar, LinkedIn, TikTok, Microsoft Ads/Clarity, YouTube, Matomo. New rows are appended; save to keep them.
Version
1.2.0 — Auto-scan for common third-party cookies by category.
License
GPL-2.0-or-later