Skip to content

Script blocker

For vendors with no bridge — Meta Pixel, TikTok, LinkedIn, Hotjar, embedded iframes — mark the <script> with a placeholder type and a category. The CMP won’t execute it until that category is granted.

<script
type="text/plain"
data-cookieconsent="statistics"
src="https://www.googletagmanager.com/gtag/js?id=G-XXXX"
></script>
  • type="text/plain" makes the browser treat it as inert data, not code.
  • data-cookieconsent="<category>" names the gating category. The first-party alias data-lightning-consent works too.
  • Categories: necessary, preferences, statistics, marketing.

It’s Cookiebot-compatible, so if you’re migrating from Cookiebot your existing data-cookieconsent markup keeps working.

The same pattern gates Meta Pixel, TikTok, LinkedIn Insight, X/Pinterest/Snapchat pixels (all marketing), Hotjar / Microsoft Clarity (statistics), and iframe embeds like YouTube or Google Maps.