|
/ Documentation /Consent & Compliance/ Block Scripts Until Consent (Resource Blocking)

Block Scripts Until Consent (Resource Blocking)

Block Scripts Until Consent holds supported scripts and embeds that match a rule until their category is allowed. Some resources, including image pixels, can still load.

What is Block Scripts Until Consent?

Block Scripts Until Consent is a consent-first approach to loading third-party scripts and embedded content on your website.

When enabled, SureCookie checks the scripts, embeds and stylesheets on each page, both in the HTML your server sends and in what scripts add after the page loads. Anything it recognizes as non-essential is held until the visitor accepts its category.

Think of it as a gatekeeper – scripts wait at the door until they’re invited in.

How It Works

The process is straightforward:

  1. A visitor lands on your page
  2. SureCookie checks the page’s scripts, iframes, embeds and stylesheets against its catalog and your own rules
  3. Recognized non-essential resources are held before they load
  4. The visitor sees your consent banner and makes their choice
  5. Only the approved categories get unblocked and run

All of this happens instantly, behind the scenes.

Getting Started

You’ll find this setting in your SureCookie admin dashboard:

SureCookie → Tracking Manager → Scripts and Embeds → Block Scripts Until Consent

Scripts and embeds management interface

It is on by default. If it is off, toggle it on and click Save.

Smart Categorization

Not all scripts are treated the same. SureCookie carefully sorts every resource into the right category:

  • Essential: Required for basic site functionality (always allowed)
  • Analytics: Tools that help you understand visitor behavior
  • Marketing: Advertising and retargeting scripts
  • Functional: Features that enhance user experience

When a visitor consents to Analytics only, just those scripts run. Marketing stays blocked. It’s precise, respectful, and exactly how consent should work.

Supported Content Types

SureCookie holds these when they load from a service it recognizes, or from a host you added on Scripts and Embeds:

  • Scripts, external and inline
  • Iframes, including lazy-loaded ones, such as YouTube, Vimeo and Google Maps embeds
  • Embed and object elements
  • Stylesheets and the fonts they load, plus preload, prefetch and preconnect hints (since 1.5.0)
  • YouTube and Vimeo video facades (since 1.8.0)

Images, plain HTML5 video and audio files, and files that a stylesheet or a script fetches by itself are not held. See What SureCookie Blocks Before Consent for the full list and how to cover the gaps.

Known Services

Open Tracking Manager → Known Services to browse services included in the catalog.

Powered by SureCookie Library

Blocking runs on your own site, from a catalog that ships with the plugin and is refreshed from library.surecookie.com. The cloud scanner finds what your pages load, so your list stays complete.

What makes it different:

  • Real Browser Scanning: We detect scripts the way browsers actually load them, not just by reading source code
  • Compliance Ready: Kept current: the catalog is updated as services change how they load
  • Privacy First: The scanning itself respects privacy. We analyze behavior patterns, not personal data

This combination means fewer missed scripts, better compliance, and less manual work for you.

Quick Recap

What it doesWhy it matters
Holds recognized scripts, embeds and stylesheets before they loadRecognized trackers wait for consent
Categorizes resources automaticallyVisitors control exactly what runs
Covers videos, maps and fontsEmbedded content and fonts wait too
Uses real browser scanningFinds trackers that only appear after the page loads

Need Help?

If a script isn’t being detected or you’re seeing unexpected behavior, reach out to our support team. We’re happy to investigate and update our detection library if needed.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
%title %title
Table of Contents
Scroll to Top