Skip to main content
This feature is in beta. Get in touch with our team to request early access.
To comply with privacy regulations, you can prevent 3rd party iframes from loading before gaining user consent. Enable this feature in the CookieChimp dashboard, then update your website’s embeds.

How do I block an iframe?

<div data-service="youtube" data-id="<video-id>"></div>

How do I customize the iframe placeholder?

<div
  data-service="youtube"
  data-id="5b35haQV7tU"
  data-autoscale
  data-iframe-id="YoutubeEmbed"
  data-iframe-loading="lazy"
  data-iframe-frameborder="0"
></div>

What configuration options are available?

  • data-service: [String, Required] Service name (e.g., YouTube, Vimeo, Google Maps).
  • data-id: [String, Required] Unique resource ID (e.g., video ID).
  • data-title: [String] Notice title.
  • data-params: [String] Iframe query parameters.
  • data-thumbnail: [String] Path to custom thumbnail.
  • data-ratio: [String] Custom aspect ratio (e.g., “16:9”).
  • data-autoscale: Responsive iframe that fills parent width and scales proportionally.
  • data-widget: Use for custom widgets with explicit width and height.

Which services are supported?

  • YouTube
  • Vimeo
  • Google Maps
Looking for a service that’s not listed? Let us know.