YouTube nocookie option

For the last two years I have had a website designed in Sparkle with lots of YouTube videos. One of the things I decided early on was that I wanted no tracking cookies at all, especially from embedded YouTube videos.

So until recently, my workflow was to publish to a set of local files, run a global edit on all the .html files to change all the youtube URLs to youtube-nocookie.com and upload to the web server. Because Sparkle at that time generated embedded videos with

A recent change in Sparkle altered all that as it now uses the YouTube API via Javascript. Also you now have to publish direct to the web server. As a workaround, I’m currently editing the javascript after the upload to add host: ‘https://www.youtube-nocookie.com’ to the YT.Player functions.

As I understand it that’s an undocumented parameter but it does work and I’d really like an option in Sparkle to generate that non-tracking code for me.

I made the mistake of putting an html tag in the post above. It should read:
Because Sparkle at that time generated embedded videos with iframe it was easy.

We were required to use the YouTube api, or we wouldn’t have passed YouTube’s review and they would have disabled the key we use.

We’ll look into that, but I think it’s disingenuous to think YouTube doesn’t track.

I think you will find the only way to stop tracking by YouTube is at browser (user) level. For example, the latest version of Safari has this option built-in and enabled as standard, but you, as the site developer, cannot set this as a default behaviour.

OK. I was going by this: https://portalzine.de/dev/api/youtube-iframe-api-and-cookieless-domain-solution-gdpr-dsgvo/
Maybe that doesn’t do what’s implied.

This is my site, BTW.
https://meandmyshadows.me/
Content by my wife.

Thanks, added this for Sparkle 3.

The only way to keep Google’s cookies out of your jar is to not use embedded YouTube videos.

When you use embedded YouTube videos you give Google control of your site and users. Store all your videos in Sparkle and then link those videos out to your YouTube site. You want to keep your website separate from your YouTube site. This dramatically simplifies GDPR and overall user privacy.

Sparkle not only does a great job handling video, but becomes your CMS (Content Management System). Use this great function to your advantage.

1 Like

Thanks, Duncan.
However, there seems to be much confusion about the youtube-nocookie URL and what it achieves, both out there on the web and, not least, in my own mind!
I’m pretty sure that in the past, it did stop Google storing tracking cookies, but it seems from my own testing today, no longer.
If you choose a video on YouTube and then click share/embed to see the suggested iframe code, there an option to ‘Enable privacy-enhanced mode’. Selecting the option adds the -nocookie to the URL. The information pop-up says: “When you turn on privacy-enhanced mode, YouTube won’t store information about visitors on your website unless they play the video.” It’s debatable how much of a privacy enhancement this actually is!
So as others have pointed out, it’s actually not possible to prevent YouTube cookies, if indeed it ever was.
So I’ll withdraw the enhancement request, Duncan. Thanks for considering it.

Can’t really do much harm (assuming it doesn’t stop working!).

The whole debate about cookies is somewhat muddled by the lack of understanding of modern tracking techniques, and not by you or me, mostly by legislators and law enforcement.

Even by storing no cookies, Google would still know it’s a specific user/profile via countless direct or indirect signals. You use gmail on the same computer? You’re logged in youtube? Your site uses Google Analytics? Google Fonts? A captcha? It’s so easy for them.