Hosting videos with a third-party service like YouTube or Vimeo is a great way to stream videos on your website, without carrying the server load for every view. These services are mostly free and come with another price, which is sharing your website’s visitor behavior so that these websites can recommend other videos based on statistics. In some cases, they might even personalize the content on different domains and show relevant advertising if the data permits.
We have discussed the YouTube no-cookie variant of embedding videos, and especially why this embed is still not compliant with most privacy laws, and therefore should be blocked prior to consent.
We will now focus on embedding Vimeo, and in contrast with YouTube no cookie, this can be done privacy-friendly.
Embedding Vimeo with HTML and Gutenberg
Many page-builders include HTML elements for Vimeo iFrames or video widgets to embed the video even easier. For the classic editor, an iFrame would suffice, and Gutenberg has its own Vimeo block. Whatever you will use to embed Vimeo, a simple change is needed and one thing to consider before proceeding, making the implementation privacy-friendly.
If you use the Vimeo block from Gutenberg, Vimeo will be embedded privacy-friendly automatically. If you want to remove the restrictions, please add the following to your functions.php (or a MU plugin), or use the video block instead.
Embedding the video with a DNT parameter
For non-Gutenberg implementations you will need to add a parameter to the URL of the video you’re embedding:
Not privacy-friendly: https://vimeo.com/315487551
If the URL has other parameters, please append it as such:
You will use this URL, either in HTML or a widget.
Our example is done with an iFrame in classic editor. You can have a look at our source for the URL, and cookies to see there are no tracking cookies from Vimeo.
Vimeo and Complianz
If Vimeo is configured with the correct parameters, you can disable the placeholder and integration from Complianz under Complianz -> Integrations -> Services.