• Resolved diegoparoni

    (@diegoparoni)


    Hi Fabio!

    I’m using FAZ Cookie Manager 1.31.0 on WordPress with Elementor, and I think I found a small inconsistency.

    I have a YouTube video in an Elementor “Video” widget. I marked YouTube as “necessary” in the plugin’s cookie/service settings, but the video keeps showing the “content blocked” placeholder anyway.

    Digging a bit into the code, it looks like Elementor Video widgets get their category from the bundled includes/data/known-providers.json file (via Known_Providers::get_all()), where YouTube is hardcoded as “marketing” – separate from the rules you configure in the admin settings, which seem to only apply to the generic iframe/script blocker. So changing YouTube’s category in the settings doesn’t affect Elementor’s native Video widget at all.

    Would it be possible to have the Elementor Video widget integration respect the category set in the admin settings too (or add a filter to override it)? Happy to share more details/a code snippet if it helps.

    Thanks a lot for the great plugin, and for looking into this!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author fabiodalez

    (@fabiodalez)

    Thanks, your reading of the code was exactly right. The Elementor Video widget builds its iframe in the browser from its own settings, so the normal iframe blocker never sees it and FAZ judges it on a separate path. That path took the category straight from the bundled provider list, where YouTube is Marketing, and ignored everything configured on the site.

    This is fixed in 1.32.0. The widget now goes through the same rules as every other embed: a custom rule under Cookies, Script Blocking — Custom Rules, the faz_blocking_rules filter you asked about, an entry in Settings, Script Blocking, Script Blocking Exceptions, and the faz-skip class, which you can put on the widget from Elementor’s Advanced tab under CSS Classes. It is also judged on the URL the browser actually loads, not only on the one you typed in the widget: you paste a youtube.com/watch or youtu.be link, Elementor loads youtube.com/embed (youtube-nocookie.com/embed with privacy mode on), so a rule written as youtube.com, youtube.com/embed or youtube-nocookie.com applies either way. The bundled list is only used when none of those matches.

    One question so I can be sure it covers your case: how did you mark YouTube as necessary? If you used a custom rule or an exception, the update is all you need. If you moved the YouTube cookies to Necessary in the cookie list instead, that setting describes the cookies but does not decide what gets blocked, for any YouTube embed and not only this widget, so a custom rule with youtube.com as the pattern and Necessary as the category is the way to do it.

    Please bear in mind what Necessary means here: the video, and YouTube’s cookies and tracking with it, loads before the visitor has made any choice. In the EU that is hard to justify as strictly necessary, and German courts have ruled against loading Google services this way without consent. If what you want is simply for visitors to be able to watch the video, you can keep YouTube in Marketing and turn on “Enable per-service consent” in Settings: the Accept button on the placeholder then grants YouTube alone, without accepting the rest of the Marketing category. With that setting off, the same button accepts the whole category.

    Thread Starter diegoparoni

    (@diegoparoni)

    Thanks for your outstanding work and the quick turnaround!
    The faz-skip class is very useful.
    I had been using custom rules on YouTube.
    Have a great day.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.