Hi @marzamele,
I suspect that the video is not blocked because it is implemented using a plugin with which we haven’t integrated yet. Am I correct that you are using Tatsu Builder?
Kind regards,
Leon
Hello,
Would there be a way to solve this?
Thanks
Hi @marzamele,
You can add the below filter as a .php file to the folder /wp-content/mu-plugins/ on your website to block the Tatsu script which initializes the YouTube API and causes these cookies to be set.
Note that as this blocks the entire “helpers.min.js” script from Tatsu, it would cause other functionalities included in that JavaScript file to get blocked as well.
<?php
defined( 'ABSPATH' ) or die();
/**
* Block the helper script that loads the YouTube iFrame API
* Add a placeholder to a div with class "tatsu-youtube-wrap"
* @param $tags
*
* @return array
*/
function cmplz_tatsu_script( $tags ) {
$tags[] = array(
'name' => 'tatsu-youtube',
'category' => 'marketing',
'placeholder' => 'default',
'urls' => array(
'tatsu/public/js/helpers',
),
'enable_placeholder' => '1',
'placeholder_class' => 'tatsu-youtube-wrap',
'enable_dependency' => '0',
);
return $tags;
}
add_filter( 'cmplz_known_script_tags', 'cmplz_tatsu_script' );
Kind regards,
Jarno
Solved!
perfect, thank you very much