Przejdź do treści
← Back to blog
ConsentTechnical

What is prior-blocking, and why most cookie banners fail without it

Prior-blocking is the difference between a banner that looks compliant and one that actually is. Here's how it works under the hood.

June 3, 2026 · 5 min read


Plenty of cookie banners ask for consent but never actually stop the trackers. The scripts run on page load regardless of what the user clicks. Prior-blocking fixes this by preventing non-essential scripts from executing until the user opts in.

The problem

When you paste an analytics or advertising tag into your page, it runs immediately. By the time your banner appears, cookies have already been set and data has already been sent. The consent prompt is then cosmetic.

How prior-blocking works

A consent platform intercepts tagged scripts before they execute. It rewrites or holds them, and only releases the ones whose category the user has accepted.

<!-- Held until the user accepts the "analytics" category -->
<script type="text/plain" data-cc-category="analytics"
  src="https://www.googletagmanager.com/gtag/js?id=G-XXXX"></script>

By setting the script type to text/plain, the browser won't run it. When consent is granted, the loader swaps the type back to the proper value and the script executes — but only then.

Auto-blocking vs manual tagging

  • Auto-blocking: the loader recognizes common trackers and holds them without you editing markup.
  • Manual tagging: you mark scripts yourself with a category attribute for precise control.
CookieCrumb uses manual tagging: mark a script with type="text/plain" and a data-cc-category attribute and the loader holds it until consent. It does not auto-detect trackers — the WordPress and Drupal plugins do the tagging for you by script handle or library.

Without prior-blocking, a banner is a sticker that says 'compliant' on a system that isn't. With it, consent finally controls what actually runs.

Ready to make your site compliant?

Install CookieCrumb in minutes — free for your first domain.

Start free