Privacy Recommended
Load embedded videos and maps only after a click
Show a still image and a button in place of each third-party embed. Load the video, map or social post only after the visitor clicks.
How to do it
Embeds from video, map and social sites set cookies and send the visitor's IP address before anyone presses play. Show a local thumbnail, a short note naming the provider and a link to its privacy policy. On click, swap in the iframe. Use the provider's no-cookie address where one exists, such as youtube-nocookie.com. Give every page a plain link to the content too, so it works without JavaScript. Hosting the video yourself avoids the question.
Example
<div class="video" data-src="https://www.youtube-nocookie.com/embed/abc123?autoplay=1">
<img src="/img/tour-poster.webp" alt="Tour of the Example Studio workshop" width="640" height="360">
<button type="button">Play video from YouTube</button>
<p>Playing loads YouTube, which may set cookies. <a href="https://www.youtube.com/watch?v=abc123">Watch on YouTube</a>.</p>
</div>
<script type="module">
for (const box of document.querySelectorAll('.video')) {
box.querySelector('button').addEventListener('click', () => {
const frame = document.createElement('iframe');
frame.src = box.dataset.src;
frame.title = box.querySelector('img').alt;
frame.allow = 'autoplay; fullscreen';
box.replaceChildren(frame);
}, { once: true });
}
</script>
How to check
With a fresh browser profile, load each page with an embed. No request goes to the provider until the button is clicked.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/privacy/click-to-load-embeds.