How can I embed my YouTube videos
YouTube & GDPR: Embed videos in compliance with data protection regulations
Embedding YouTube videos is a fine thing. You copy the embed code, paste it into a blog article and the corresponding YouTube video is displayed in the article.
Thanks to the Embed function integrated in WordPress, the whole thing is even easier: You simply copy the YouTube URL, paste it into the article and it is in the article.
As far as data protection is concerned, however, this is not entirely unproblematic.
By embedding YouTube videos, various connections are established to Google servers, through which several cookies are stored in your readers' browser and information about them is sent to YouTube and Google's advertising service DoubleClick:
And that even before your readers click on the video!
However, there are several solutions to prevent this and to embed YouTube in a more data-efficient manner.
1. Embed with Advanced Data Protection Mode
YouTube itself offers the option of generating embed codes that do not set cookies.
To do this, go under the YouTube video on Share> Embed, scrolls down and puts a check mark next to it Activate extended data protection mode:
PS: By the way, it is a very recommendable video for everyone who needs a kick in the butt!
The videos will then not be from the domain youtube.com, but from youtube-nocookie.com loaded:
However, the method has two disadvantages:
Disadvantage # 1:
First, you need to search the entire blog for YouTube videos and replace each one with the new embed code.
Disadvantage # 2:
Various connections to Google servers are still established (including a cookie, which, however, contains very little information) before the user has even clicked on the video:
After all, significantly less user data is now sent to YouTube. And none at all to the DoubleClick advertising service.
But it can be done even better!
2. YouTube Lyte
With the WordPress plugin YouTube Lyte (which, by the way, comes from the developer of the popular plugin Autoptimize), you can integrate YouTube videos even more efficiently.
The plug-in has the effect that only the preview image is loaded from YouTube servers. The video itself is only loaded after the user has clicked on the play button.
A positive side effect:
The plugin improves the loading time of your website (it was actually designed for this purpose).
It automatically recognizes YouTube videos (also in the form of simple links) and replaces them with the two-click version. That means you don't have to manually replace embed codes!
In terms of design, the whole thing looks almost exactly like the normal YouTube embeds:
According to the Chrome Developer Tools, only one connection to YouTube is established, namely the one for the preview image:
If you want it to be even more data-efficient, you can specify in the settings that featured images are cached on your own server.
This ensures that an external connection to YouTube is no longer established.
As of version 1.7.2, a note text can be displayed under the videos (e.g. to refer to the data protection declaration):
As of version 1.7.3, YouTube videos are no longer from the domain youtube.com, but from youtube-nocookie.com loaded. This is also a very useful improvement for data protection!
3. Borlabs Cookie
It offers opposite YouTube Lyte various advantages:
- Borlabs Cookie also works for Vimeo videos and any content sent via iframe getting charged.
- When displaying the cookie banner, users can give consent for all external media (including Google Maps, Vimeo videos, etc.) at once
- It also works without an API key from YouTube
- It is updated regularly and offers German support
- You don't need a second, third or fourth plug-in for other external services (Borlabs Cookie is an all-in-one solution!)
An embedded video with Borlabs Cookies looks like this:
The YouTube preview image is cached by Borlabs Cookie on your own server. This means that no connection to YouTube servers is established before a user clicks on the button.
If you have copyright concerns, you can also deactivate the thumbnail completely.
Would you like to find out more about Borlabs Cookie? Then take a look at my detailed test report: Borlabs Cookie: Mega instructions and test report (2020)
4. Extra Privacy for Elementor
If you use the page builder Elementor, you can also use the Extra Privacy for Elementor plug-in to integrate a two-click solution into the video widget and only load videos from YouTube or Vimeo after clicking.
In addition, a note text is displayed after clicking the play button:
You can see the plugin in action on the developer's website.
5. Set a link to YouTube
By far the most data-efficient way to show your visitors a YouTube video is with a simple link to the video, such as B .:
The disadvantage, of course, is that your users will then leave your website and be redirected to YouTube.
You may already be aware of this, but for the sake of completeness it should not go unmentioned here.
- What is a Gruenland ecosystem
- How do Linux runlevels work
- How did Lord Hanuman die
- How to say salary in Indonesian
- Turkey violates the territorial integrity of Iraq
- How to Download Tamil FLAC Songs
- Why do pitcher plants become carnivorous
- What are antigens in the bacteria
- What are some interesting facts about Eleanor Roosevelt
- Can someone be magical
- How do you say sandwich in Bengali
- You could die from a paper cut
- How does encryption protect your data
- How do you rate the data visualization
- What is the purpose for nickel electroplating
- What font does iOS 11
- Engineering colleges India
- Magnesium glycinate helps manage anxiety
- What's your favorite American musical
- Is paprika a pepper
- Is Grexit a bankrupt country
- Should Quora make more use of symbols
- What is a PPC department
- How do philosophers research