iFrame blocking prevents embedded third-party content (videos, maps, social widgets) from loading until the visitor consents to the relevant cookie category. A styled placeholder is shown in place of the blocked content, explaining what will load after consent.
What iFrame Blocking Does
Many third-party embeds use iFrames to load content from external domains. These iFrames often set cookies and track visitors. The iFrame blocker uses a MutationObserver to detect iFrame elements as they are added to the page and replaces them with consent placeholders.
Supported Services
The iFrame blocker recognises 12 common services:
- Video - YouTube, Vimeo, Dailymotion.
- Maps - Google Maps, OpenStreetMap.
- Social - Facebook, Twitter/X, Instagram, LinkedIn, Pinterest.
- Music - Spotify, SoundCloud.
Each service is mapped to a cookie category (typically Marketing or Functional). The placeholder displays the service name and a consent button for the appropriate category.
Placeholder Display
When an iFrame is blocked, a styled placeholder appears in its place. The placeholder includes:
- The service name (e.g. "YouTube Video").
- A message explaining that the content requires consent.
- An "Accept" button for the relevant cookie category.
- The placeholder matches the dimensions of the original iFrame.
When the visitor clicks the accept button, consent is granted for that category, the placeholder is replaced with the original iFrame, and the content loads.
How to Enable
In the Banner Editor, go to the Integrations tab. You will see a list of supported services with toggle switches. Enable the services you want to block. Each toggle controls whether that specific service's iFrames are intercepted.
Tip: Only enable iFrame blocking for services that actually appear on your site. Enabling all services has no negative performance impact, but keeping the list focused makes it easier to manage.