• Skip to primary navigation
  • Skip to header navigation
  • Skip to main content
  • Skip to primary sidebar

RecipeTin Eats

Fast Prep, Big Flavours

  • My RecipeTin
  • NEW cookbook!
  • Recipes
  • Recipes By Category
    • Iconic + cult classics
    • Mains
      • Chicken
        • Chicken mince
      • Beef Recipes
        • Ground Beef (Mince)
      • Pork
      • Lamb
      • Turkey
      • Shrimp / Prawns
      • Salmon
      • Fish recipes
      • Salad Meals
    • Quick and Easy
    • Soups
    • One Pot – One Pan
    • Stewy slow-cooked things
    • Slow Cooker
    • Sides
      • All
      • Salads & veg
      • Show Off Salads
      • Rice (all)
      • Fried rice recipes
      • Rice (plain)
      • Potato
    • Pasta
      • All
      • Pasta bakes
      • Pasta salads
    • Sweet
      • Cakes
      • Candy
      • Cheesecakes
      • Cupcakes & Muffins
      • Cookies
      • Puddings & Cosy Desserts
      • Bite Size
      • Pies
      • Slices & Bars
      • Frosting & Icing
      • Ice cream
    • Cuisine
      • Asian
        • All
        • Stir fries
        • Noodles
        • Soups
        • Chinese
        • RecipeTin Japan 🇯🇵
        • Korean
        • Modern Asian
        • Thai
        • Vietnamese
      • French
      • Greek
      • Indian
      • Italian
      • Mediterranean
      • Mexican
      • Middle Eastern
      • South American
    • Dietary
      • Gluten Free
      • Low Calorie
      • Vegetarian
    • Other Categories
      • BBQ
      • Breakfast
      • Burgers
      • 🎄Christmas
      • Cocktails
      • Party Foods
      • Rice Recipes
      • Roasts
      • Sandwiches & Sliders
    • Recipe collections
    • Cookbook recipes
  • My Food Bank
  • About
    • Me
    • RecipeTin Meals
    • My Cookbooks
      • Tonight (NEW!)
      • Dinner
    • Free Recipe Books
    • Contact
    • Nitty Gritty
      • Policy: Use of Recipes & Images
      • Privacy & Disclosure
Home Uncategorized

GDPR YouTube embed testing

By Goh Maehashi
Leave comment
Share
  • Copy Link
  • E-mail
  • Facebook
  • WhatsApp
Published11 Dec '25 Updated11 Dec '25

I’ve created this page to demonstrate the outputs in situ in WordPress when we try various ways of embedding privacy-compliant videos. This way the HTML can be inspected etc.

Embedded the usual way (ie. No concern for privacy)

Here is a video that is embedded the way we normally do. To embed, we simply paste in the shortened URL on the youtu.be domain provided within YouTube Studio, and we add parameter “rel=0” on the end to suppress related videos from other channels.

So, this video below is: https://youtu.be/krcMXE6Bq4w?rel=0

This is then redirected by YouTube to the full URL when the user plays the video, which is https://www.youtube.com/watch?v=krcMXE6Bq4w

When embedded on the page, this is what it looks like:

Functions.php updated with Consent Manager code

On our Dev environment (dev.recipetineats.com), we added the code from this page from Consent Manager’s documentation per Raptive’s recommendation, which on page load replaces the youtube.com domain in the embed URL with youtube-nocookies.com, and adds additional CM-related attributes to the iframe tag.

This page on Dev shows the resulting video embed.

For users who are presented with the consent banner and Reject All, they see this in place of the Youtube thumbnail:

If they click Accept, the video will play.

The problem is that for users in other regions who do NOT get presented the consent banner, they see this:

Manually altering the domain in WordPress block editor

Megan’s last email said:

Another update – as we continue testing, the team would like to ask if you can try removing the functions.php snippet you added? And then, can you manually update the singular YouTube embed with the youtube-nocookie URL? Referring to the same URL you shared here: https://dev.recipetineats.com/rump-cap-roast-picanha-recipe/
 
The team would like to test this approach. Once you’ve had a chance to adjust it on your side, just let me know and I’ll loop them in to review.

I take this to mean alter the URL in the WordPress block editor? The only way to do this is through Code View in the editor.

So, changing this …

… to this:

When you do that, you get the following on the frontend instead of a video is just the URL displayed:

https://www.youtube-nocookie.com/watch?v=krcMXE6Bq4w

In the WP block editor, once again it has this error where the video should be:

Embedding iframe snippet from YouTube with Enhanced Privacy mode enabled

One thing I did stumble upon is if I use the Embed Video code snippet provided by YouTube instead of directly pasting in the URL into WordPress and having WordPress handle the embed.

It has an option for enabling privacy-enhanced mode:

If I check this box and then copy and paste in the iframe embed into WordPress via Code View, then you do get a video. Below I’ve pasted in the YouTube embed snippet:

This way does not drop cookies before or when you play the video (go to this page which has the video by itself and you will not see cookies drop). This is by design and effectively does the same thing as the other solution above, ie. replace youtube.com domain with youtube-cookie.com.

However it does not interact with Consent Manager’s banner, so does not display their thumbnail blocking viewing of the video until consent is given. I don’t think this actually matters though, since the issues flagged by the ICO was cookies firing. As long as we comply with that, we pass … ?

And since it’s not interacting with CM, it isn’t having the issue with showing a blank space for non-EU users.

Unfortunately from our perspective, the iframe embed is not feasible as a solution in its current form for a variety of reasons. But I believe it points the way to a potential solution if we cannot get CM to work.

Previous Post
Blocks types and RTE style for Jaywing
Next Post
iframe embed from YouTube

Free Recipe eBooks

Join my free email list to receive THREE free cookbooks!

Reader Interactions

Leave a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Cooked this? Rate this recipe!




Primary Sidebar

Hi, I'm Nagi!

I believe you can make great food with everyday ingredients even if you’re short on time and cost conscious. You just need to cook clever and get creative! Read More

Free Recipe eBooks

Join my free email list to receive THREE free cookbooks!

Meet Dozer

Official taste tester of RecipeTin Eats! Meet Dozer
As Featured On

Never miss a recipe!

Subscribe to my newsletter and receive 3 FREE ebooks!

Subscribe
Recipes
  • All Recipes
  • By Category
  • Collections
About
  • About Nagi
  • About Dozer
  • RecipeTin Meals
Related
  • RecipeTin Japan
Help
  • Contact
  • Image Use Policy
© RecipeTin Eats 2026
  • Privacy Policy & Terms
Site Credits
Maintained by Human Made Designed by Melissa Rose Design Developed by Once Coupled
All Rights Reserved

Subscribe to my newsletter

Sign up and receive 3 FREE EBOOKS!