Zurück zum Hilfe-Center

Getting Started

Automatic tracker blocking

Which trackers wait for consent on their own, how it works, and how to opt a script out

With the one-line install, GetCookies holds back known trackers until the visitor accepts their category. You do not need to tag them.

What is held back

  • Marketing: Meta Pixel, TikTok Pixel, LinkedIn Insight Tag, X (Twitter) Pixel, Pinterest Tag, Snap Pixel, Reddit Pixel, Microsoft Advertising (UET), Criteo, Taboola, Outbrain, Quora Pixel, HubSpot tracking.
  • Analytics: Hotjar, Microsoft Clarity, Segment, Mixpanel, Amplitude, Heap, FullStory, Mouseflow, Lucky Orange, Crazy Egg, Yandex Metrica.

It works for the vendors' own copy-paste snippets in your page, for tags Google Tag Manager adds, and for scripts other scripts add later. After Reject all they stay off; after Accept all (or accepting their category) they load straight away, and on later pages they load directly.

Videos and maps

YouTube, Vimeo and Google Maps embeds wait behind a placeholder that keeps their size and says where the content comes from. Load content loads that one embed; accepting the embed's category (marketing for YouTube and Maps, analytics for Vimeo) loads them all.

Embeds added by scripts make no request before consent. Chrome starts loading an <iframe src> written straight into your HTML before any script can stop it (it is cancelled at once). For no request at all, write the embed like this:

html
<iframe data-src="https://www.youtube.com/embed/VIDEO_ID" data-cookieconsent="marketing" width="560" height="315"></iframe>

Google tags

Google tags (GA4, Google Ads, Google Tag Manager) are not blocked: they read Google Consent Mode, which the loader sets to denied before anything else runs. They then send cookieless pings until the visitor chooses. If you want Google tags to wait too, choose Basic under Widget > Integrations > Google Consent Mode v2.

How it works

The loader is the first script in your <head>. Before any other script runs, it watches every script the page adds and holds back the ones that load a known tracker. Held scripts are released when the visitor consents.

One limit: a tracker written as <script src="..."> straight into your HTML can be fetched early by the browser (it reads ahead in the page), but it does not run. To stop even that request, mark it yourself:

html
<script type="text/plain" data-cookieconsent="marketing" src="https://example-tracker.com/pixel.js"></script>

Settings

Under Widget > Advanced > Script Blocking, *Automatic tracker blocking*:

  • On (default for new sites): known trackers wait for consent.
  • Monitor: nothing is held back; the browser console lists what would be. Sites added before November 2026 start here, so switch to On when you have checked the list.
  • Off: the loader leaves trackers alone.

Check on your own site with GetCookies.getBlockingReport() in the browser console.

Opting a script out

  • Add data-getcookies-allow to a script tag to never hold it back.
  • Add data-blocking="off" to the GetCookies script tag to switch automatic blocking off on that page.

Immer noch nicht weitergekommen?

Schreiben Sie an [email protected] mit Ihrer Domain und dem, was Sie versucht haben. Angemeldete Kunden können außerdem im Dashboard ein Ticket eröffnen.