Thank you Marco and EnFi.
Actually I was using the Auto_block beta option, and it works: the pages with a youtube video (inserted automatically by WP, just copying and pasting the link into an article) are blocked.
Regarding Google Analytics, I’m using an option available from my theme, that let me insert the <script> GA_code </script> directly in the theme settings, and with auto_block option it works! No GA cookies, until I scroll (if enabled) or I click on a link and change page, any page, not only the “more info”.
At this point I think I’ll try to hook the header or footer in the function.php and add your code, I’m not an expert, but I was thinking to write something like:
function manage_GA(){
if ( function_exists(‘cookie_accepted’) && cookie_accepted() ) {
echo ‘<script>GA_code</script>’;
}
}
add_action( ‘wp_footer’, ‘manage_GA’ );
Do you think it could work?
Thank you!
Francesco