To hold back cookies until the website visitor has consented, Cookiebot will postpone loading the video until the visitor has consented. On subsequent page requests where the visitor has already submitted a consent, the iframe content will automatically load in accordance with the individual visitors consent state.
To implement prior consent, change the original iframe tag (example):
<iframe src="https://www.youtube.com/embed/xxxxxxxxxxx" frameborder="0" allowfullscreen></iframe>
to the following (rename 'src' to 'data-src' and apply the data-cookieconsent-attribute to the tag):
Replace the example-URL 'https://www.youtube.com/embed/xxxxxxxxxxx' with the URL of your own iframe-src.
<iframe data-src="https://www.youtube.com/embed/xxxxxxxxxxx" data-cookieconsent="marketing" frameborder="0" allowfullscreen></iframe>
Please note that YouTube offers you to serve videos from the alternative domain www.youtube-nocookie.com which is not setting http cookies. Instead the alternative domain is setting persistent "super cookies" in the browser's HTML Locale Storage which also require consent.
Display a message if not consented
Cookiebot will hide the message when the visitor has consented.
Last updated: 2 May 2018