Jump to content

Use youtube-nocookie.com for background videos

Recommended Posts

Site URL: https://www.skaarmusic.no/

I'm working on a Cookie Consent (GDPR) project for a client adding the OneTrust cookie banner to sites.

I've managed to restrict most cookies but struggling with some from youtube.

The simplest method is to use https://www.youtube-nocookie.com/ for any embeds and that does the trick on embedded videos, but background videos are a problem. The following cookies appear without the visitor's consent: NID, IDE, YSE, VISITOR_INFO1_LIVE

Looks like the cookies are coming from the iframe_api script which is used to create background videos:

<script src="https://www.youtube.com/iframe_api" async=""></script>

Removing the background video stops the cookies from dropping.

This tutorial claims to solve the issue: https://portalzine.de/dev/api/youtube-iframe-api-and-cookieless-domain-solution-gdpr-dsgvo/

An alternative solution would be for me to edit the script tag with a OneTrust class to restrict it from running without consent.

But I can't find any way of editing the YouTube API script used by Squarespace.

Any ideas?

Link to comment
  • 8 months later...
  • Replies 1
  • Views 3.9k
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.