> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cookiechimp.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Block Iframes

> Block iframes from loading before consent and show a placeholder notice.

<Snippet file="beta-access.mdx" />

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?

```html theme={null}
<div data-service="youtube" data-id="<video-id>"></div>
```

## How do I customize the iframe placeholder?

```html theme={null}
<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](mailto:support@cookiechimp.com).
