How to implement Embed Consent.
Instructions
-
Customize the Embed Consent script.
-
Place the code right after
<body>
. -
Adjust any embeds based on the tag it uses:
<iframe>
: Modify thesrc
parameter to bedata-src
<script>
: Modify thetype="text/javascript"
parameter to betype="text/plain"
-
Wrap the embed in a container:
<div class="embed-consent-wrapper"></div>
.
Example of YouTube embed (<iframe>
)
<div class="embed-consent-wrapper">
<iframe width="471" height="315" data-src="https://www.youtube.com/embed/2lAe1cqCOXo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen style="border:0;"></iframe>
</div>
Example of Twitter embed (<script>
)
<div class="embed-consent-wrapper">
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">will follow anyone who makes us laugh</p>— Twitter (@Twitter) <a href="https://twitter.com/Twitter/status/1557766422125740032?ref_src=twsrc%5Etfw">August 11, 2022</a></blockquote>
<script src="https://platform.twitter.com/widgets.js" charset="utf-8" type="text/plain"></script>
</div>
Supported third-parties.
Here are a few supported third parties by our free Embed Consent tool, more coming soon! These are detected automatically if the embed is properly integrated.
- YouTube
- Google Maps
- Vimeo