Embeds and custom scripts

YouTube, Maps, chat widgets and your own scripts.

Embedded videos and maps

A browser requests an iframe’s content as soon as it reads the tag, before any script can stop it. To hold an iframe back, give it data-cmp-src instead of src, and a category:

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

Until the visitor accepts that category, the frame shows a placeholder with a “Load content” button. The banner also catches iframes that JavaScript adds to the page later.

Fonts from Google

If your pages load fonts from fonts.googleapis.com or fonts.gstatic.com, each visitor’s browser sends its IP address to Google as the page opens. A banner can’t hold this back without your text showing in the wrong font, and in January 2022 a Munich court ordered a site owner to pay a visitor damages over it (LG München I, 3 O 17493/20). The fix is to serve the same font files from your own site. Visitors see no difference.

Platform How
WordPress Many themes and page builders have a “load Google Fonts locally” setting (Elementor: Settings > Performance). Otherwise a plugin that downloads the fonts to your site does it.
Webflow Upload the font files under Site settings > Fonts instead of adding them as Google Fonts.
Hand-built sites Download the files (for example from fontsource.org or the font’s own repository), put them on your server, and point your CSS @font-face at them.

Shopify and Wix serve their built-in fonts from their own servers. Our check flags any page that still calls Google’s font servers.

Your own scripts

Mark a script with the category it needs, and it waits until the visitor accepts that category:

<script type="text/plain" data-cmp="analytics">
  // runs after the visitor accepts Statistics
</script>

For a script that must always run, add data-cmp="ignore".

Automatic blocking

The banner holds known tracker scripts automatically, whether they are in your HTML, injected by Tag Manager or added by a plugin. The list includes Google Analytics, Google Ads and Tag Manager’s gtag, Meta, LinkedIn, TikTok, Pinterest, Microsoft, Hotjar, Clarity, HubSpot and Intercom, plus YouTube, Vimeo, Maps and Spotify embeds. Rules from your site check are added to this list. To add your own, use Other services to keep off until visitors agree under Advanced on the Banner tab: one per line, the host followed by analytics, marketing or functionality.