Block YouTube embeds until cookie consent in WordPress
Hold YouTube, Vimeo and Google Maps embeds until the visitor accepts Marketing cookies, using Omea Consent's auto-blocking – no shortcode changes needed.
A YouTube video, a Vimeo player or a Google Map embedded on your page loads content from another company – and with it, cookies and tracking. Under the ePrivacy rules that needs consent first. Omea Consent’s auto-blocking holds these embeds until the visitor accepts Marketing.
Which embeds are held
With auto-blocking on, iframes from these addresses are held as Marketing:
youtube.com/embedandyoutube-nocookie.com/embedplayer.vimeo.com/videogoogle.com/mapsfacebook.com/pluginsdoubleclick.net
It works for embeds from the block editor, page builders and shortcodes alike – Omea checks the finished page, not how the embed got there.
Turn it on
- Go to Omea Consent › Settings › Advanced.
- Switch on the Auto-blocking · Beta card and click Save changes.
- Open a page with a video in a private window. The video frame stays empty.
- Click Accept all (or allow Marketing in Preferences). The video loads in place.
Version 1.0.2 fixed a bug where held embeds stayed blank after consent – update if you are on an older version.
Tell visitors why the video is missing
Before consent the frame is blank. A short line under important videos helps, for example: “This video loads after you accept marketing cookies – change your cookie settings.” A link to #omea-consent-preferences opens Omea’s preferences window. See Add a Cookie settings link.
Check with a scan
Run a cloud scan. YouTube’s cookies should no longer appear in Set before any choice or Set after “Reject all”.
More on what auto-blocking covers: Stop WordPress setting cookies before consent.
Frequently asked questions
Is youtube-nocookie.com enough without consent?
It reduces cookies, but the player still loads from Google’s servers. Omea Consent treats youtube-nocookie.com/embed the same as YouTube and holds it until Marketing consent.
What do visitors see before they consent?
The embed’s frame stays empty until Marketing is accepted. As soon as the visitor accepts, the video or map loads in place – no page reload needed.
Can I put embeds in a different category?
No. Embeds that auto-blocking recognises are always held as Marketing, because the video and map providers use their cookies for advertising and tracking.