const getCookieValue = (name) => ( document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)')?.pop() || '' ); if (getCookieValue('BCConsent') === '' || getCookieValue('BCConsent') === 'false') { window.COOKIES_BLACKLIST = [ /googletagmanager/, /google-analytics\.com/, /googleads\.g\.doubleclick\.net/, /connect\.facebook\.net/ ] } else if (getCookieValue('BCConsent') === 'true'){ window.COOKIES_BLACKLIST = []; }