If you've ever embedded a video from YouTube onto your website, you may have noticed the option to "Enable privacy-enhanced mode".
If you hover over the information icon next to this option, a pop-up explains that "When you turn on privacy-enhanced mode, YouTube won't store information about visitors on your website unless they play the video."
But what exactly does this mean?
YouTube's default setting is to leave privacy-enhanced mode off. This allows them to place a tracking cookie on any computer that a viewer uses to visit your webpage.
A cookie is a small file sent from a website and stored on the user's computer by their web browser. These files hold data such as the name of the site being viewed, what pages were visited, what products or other content were viewed, etc.
With this cookie, YouTube can now target ads to the user's interests based on the information that the cookie collected. Every time the user visits a webpage with embedded content from YouTube, a cookie is created to collect more information about that user.
Many people see tracking cookies as an invasion of privacy since they allow a site to build up profiles on users without their consent.
While you can't completely stop YouTube from installing cookies through the embedded videos on your site, enabling privacy-enhanced mode will allow You Tube to install the cookies only when a user actually clicks to play one of the videos. This protects the privacy of anyone who is browsing your website, but doesn't watch the videos embedded from YouTube.
To enable privacy-enhanced mode on your YouTube video embeds, just tick the box labeled "Enable privacy-enhanced mode" at the bottom of the YouTube embed window. This will change the embed code to include the "-nocookie" tag.
While you're adjusting your embed options, you should also make sure that you have un-checked the "Show suggested videos when the video finishes" option. To learn more about this option, you can view our blog "Take control of your YouTube videos".
Now just click on "Copy" and paste the embed code into your website to embed the video.
Note: If you have already embedded this video on your website before enabling the privacy-enhanced mode, your website will not automatically update to include the "-nocookie" tag. You must replace the current embed code on your website with this new one.
The correct embed code should read:
...src="https://www.youtube-nocookie.com/embed/your video code?rel=0"...
If your embed code reads:
...src="https://www.youtube.com/embed/your video code?rel=0"...
You must add in the "-nocookie" tag.
If you need any additional help with embedding your YouTube videos on your website