Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YouTube and GDPR compliance for videos embebed on website

I came to know even embedding of youTube videos on website are also affected by GDPR law, even for this we need user consent. There is not much i can find on the internet how to make embedding of youtube videos GDPR compliance and how we can take user consent for this.

After digging for few days i found following link which say how we can use https://foliovision.com/support/fv-wordpress-flowplayer/requests-and-feedback/youtube-and-gdpr

following link from google allow us to use it in no cookie option but is this compliance with GDPR https://www.youtube-nocookie.com/embed/MjZxCbMQmXg

Is there any easy way of getting user consent for all such as third party tools etc.

like image 752
Learning Avatar asked Oct 18 '25 11:10

Learning


2 Answers

I'm currently working with a very similar issue. The solution I have working so far is like this:

  1. Install Cookie Consent Plugin from https://privacypolicies.com/cookie-consent/ and configure it
  2. Wrap Youtube embeds with this sort of PHP:

     if (isset($_COOKIE['cookie_consent_level']) && 
        $_COOKIE['cookie_consent_level'] == "targeting-cookies") {
         // If we are allowed to use targeting cookies, 
         // include the Youtube/FB/Google code.
         print $youtube_embed_code;
         print $google_retargeting_code;
         print $facebook_pixel_code;
     }
    

    What that provides is code load on second page view (within 12 month window). If your default cookie setting is the most liberal, eg targeting-cookies, then all subsequent page views on your site for that visitor will include the appropriate embeds.

I'm close to getting something working on first page load, after approval is sought, but not quite there yet.

like image 178
Danny Avatar answered Oct 22 '25 06:10

Danny


This plugin helped: http://wordpress.org/plugins/youtube-embed-plus/

Improved GDPR compliance options: YouTube no cookie, YouTube API restrictions, GDPR consent mode

To see how it works, without having to first download the plugin, I suggest watching this video: https://www.youtube.com/watch?v=lm_HIic6obw

Basically, there's a "preload" message displayed until the site visitor accepts the YouTube.com connection and cookies.

like image 38
conphettywhap Avatar answered Oct 22 '25 04:10

conphettywhap



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!