Hi there!
I’m looking for a solid way to implement a GDPR-compliant cookie consent banner.
Up to now, I’ve been using Finsweet’s old cookie consent solution for analytics cookies, but in my current project I’m running into limitations. Specifically, I need to:
block all YouTube video players until consent is given
block all YouTube videos that are embedded inside a lightbox until consent is given
I’ve tested different services like Cookiebot, etc. They work well and are easy to integrate, but they often only block the standard Google Analytics tag by default.
So I’m curious: how do you handle this in your projects?
You can wrap all YouTube iframes in a custom “data-consent-block” div and swap the src with a data-src until consent flips, had to do this on a client build with lightboxes too. Finsweet’s Attributes + a tiny custom script handles both standard embeds and lightbox videos reliably.
@ianm , Are you looking for something similar? I can build a fully custom YouTube cookie consent solution for your website. Visit the URL when you click on popup Accept button, it will allow you to see the video.