In some cases, a script will set Cookies that fall into more than one category. A YouTube video-embed can set one cookie in statistics and one in marketing. If you wish to block a script in more than one category you can use the same logic behind, blocking of inline scripts.

The code below checks for both statistics and marketing to be true before the script can fire.

if (CookieInformation.getConsentGivenFor('cookie_cat_statistic') && CookieInformation.getConsentGivenFor('cookie_cat_marketing')) {

// Insert your code here


To use Youtube Embed inside this IF STATEMENT

document.write('<iframe width="560" height="315" src="" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>');
Did this answer your question?