How to Embed YouTube Videos in WordPress with Privacy Enhanced Mode | Web Development
If you’re thinking of embedding YouTube videos that don’t collect user data, then this post is for you.
You probably already know. The GDPR aims to give your visitors control over the data you can glean from them. You’d have to get their consent before collecting any of this data, and that includes video content.
By default, when you embed a YouTube video on your site, it will leave a cookie when a user views the video. If this is something you want to prevent, then embedding videos with the privacy enhanced mode is the way to go.
YouTube Privacy-Enhanced Mode
As the name implies, this feature is set to improve the privacy of your videos. The YouTube privacy-enhanced mode protects your users by stripping cookies from the video, so your users leave no trace of their viewing habits on your site. It works on mobile platforms, too.
Here’s how to embed YouTube videos privately on your WordPress website.
Embedding Videos You Own
If your business owns the videos you want to share, follow these steps.
Upload the video if it isn’t already up on your YouTube account. Log in to your YouTube channel and click on “Upload.”
Set the description and name of the video as you see fit. If you don’t intend for the video to be public, don’t put in any tags. Finally, set your video to “unlisted.” Unlisted means only people who have the link to the video can see it.
Next, click on “Embed” and then “Show more.” It will switch to a page with more options.
On this new page tick the check-box to allow “Privacy-enhanced mode.” Also, tick the box for “show player controls.” Untick the rest.
Copy the embed code for the video to your clipboard.
Now click on save changes at the top of the page and exit.
Using the Embed Code
Log into your WordPress dashboard and click on new post.
Switch from the visual editor to the text editor by clicking on “Text.”
Next, paste the embed code of the video you intend to show to your visitors. Switch back to the visual editor to continue editing your content.
The privacy-enhanced mode setup is now completed.
Embedding Third-Party YouTube Videos
Third-party videos are videos that belong to someone else that you have permission to use.
To embed this type of YouTube video privately in WordPress, follow these steps.
Open the video you intend to share as shown in the screenshot below.
Click on “Share.” A small dialog box will pop up on the screen. In this box select “Embed.”
On the next page you will see the embed code showing the frame width and other details. Edit them as you see fit.
Scroll down to the bottom of the embed section. You will need to uncheck some boxes to set privacy-enhanced mode.
The following is a quick list to explain what the options mean.
1. Show Suggested Videos When Video Finishes
This setting lets YouTube serve a random video to your user as soon as your embedded video ends. You should untick this option as it can distract your user from your content.
2. Show Player Controls
You should allow your users to skip, pause and play your videos without hitches. Tick this box.
3. Show Video Title and Player Actions Menu
If you want your video to be shareable, then tick this option.
4. Enable Privacy-Enhanced Mode
This feature is the cookie-stripping engine itself, so make sure you tick it.
After all the above steps, your screen should look like the screenshot below.
Copy this link to your clipboard. You can click on copy to do that.
You can avoid breaking the GDRP laws when you embed YouTube videos with the Privacy-enhanced mode. It also adds a touch of professionalism to your content and website. If you follow the steps outlined above, you should have it all sorted out quite smoothly.