BerryCookie is a cookie consent service (a CMP) that I built for my own websites and that anyone can now use. You add one line of code to your page, and BerryCookie shows the banner, blocks trackers until the visitor makes a choice, and keeps a record of that choice. There's a free plan to start with.

Why I built yet another cookie banner

I run several websites, and they all need the same thing: a GDPR cookie banner that doesn't slow the pages down. The big tools, like Cookiebot, do the job, but you pay per domain and get far more than you need. Many free options, on the other hand, just display a message while the analytics scripts load anyway, whatever the visitor clicks. A banner that blocks nothing won't help you much if anyone ever checks.

So I wrote one from scratch, with three rules: keep it small, make it actually block, and make it work on any website, whatever it's built with.

Installation

The script has to be the first one in <head>, before any tracker:

<script id="BerryCookie" src="https://cdn.berrycookie.com/bc.js" data-key="YOUR-SITE-KEY" data-blockingmode="auto"></script>

You'll find the key in the BerryCookie dashboard once you add your site. There's a plugin for WordPress and a template for Google Tag Manager.

What it does

Blocks trackers until consent

In automatic mode, BerryCookie recognizes known trackers such as Facebook, LinkedIn, TikTok, Hotjar and Microsoft Clarity, and won't let them run until the visitor accepts the matching category. That also covers scripts injected later by other scripts, not just the ones written straight into the HTML.

You tag your own scripts and iframes with a category, such as statistics or marketing, and they start only after consent. A YouTube video embedded in a post, for example, loads only once the visitor accepts marketing cookies.

Google Consent Mode v2

Google tags aren't blocked. They get Google Consent Mode v2 signals instead: everything is denied by default, and an update goes out after the decision. Google Analytics and Google Ads work exactly as far as the visitor's choice allows, and Google Tag Manager receives a dedicated event you can build your triggers on.

Regional rules

Not every visitor has the same rights. For the European Union, the banner asks for consent before anything starts (opt-in). For other regions you can choose opt-out, where everything runs and the visitor can refuse, or show no banner at all. You set the rules in the dashboard, based on the visitor's country.

Cookie list and preference center

Visitors see the categories, each with its own switch, and the cookies in each one. You declare your cookies in the dashboard, and the monthly scan shows you what it actually found on your site, so nothing stays undeclared. Once visitors decide, a small round button lets them change their mind at any time, and they can drag it elsewhere if it covers something on the page.

Consent log

Every decision is recorded: which categories were accepted, and when. If you're ever asked to prove that a visitor gave consent, it's in the log.

Small enough not to slow you down

The main script is about 7.5 kB gzipped and has no dependencies. The preference window loads separately, after the banner is already on screen, so the first view never waits for it. The visitor's choice is kept in a first-party cookie on your own domain.

What no banner can do

Something I learned from browser testing that few tools mention: automatic blocking stops trackers from running, but a <script src> written directly in the HTML can still be downloaded before any JavaScript runs. The browser reads ahead in the page and starts downloads early. If you don't want even that request to happen, tag the script with type="text/plain" and a category, and the browser won't fetch it at all until consent.

The same reasoning explains another rule: when a visitor withdraws consent for a category, the page reloads. A script that's already running can't be stopped from the outside, so a reload is the only honest way to do it.

And to be clear: BerryCookie helps you follow the cookie rules, but it doesn't write your privacy policy and it isn't a substitute for a lawyer.

Coming from Cookiebot

BerryCookie also understands Cookiebot's data-cookieconsent attribute. If your scripts are already tagged for Cookiebot, you swap the line in <head> and your existing tags keep working.

Plans

You can start for free. The paid plans, Pro, Business and Agency, are for larger sites and for agencies that manage several clients. Among other things, they add support for IAB TCF v2.2, the framework many ad networks require. Details and prices are on berrycookie.com.

Why I'm writing about it on Genstackcore

Genstackcore is where I write about what I build, and BerryCookie is one of my projects. You can read more about the blog here. I'll come back with posts on how it works inside, from script blocking to the browser tests. If you try it and something doesn't behave the way you expect, write to me from the contact page.