Script Custom

You can add this custom code to target the byscuit cookie and check what type of cookie the user has accepted around your code that sets the cookie in js.

function getCookie(cname) { let name = cname + "="; let decodedCookie = decodeURIComponent(document.cookie); let ca = decodedCookie.split(';'); for(let i = 0; i <ca.length; i++) { let c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } //et la condition suivante if (getCookie("cc_cookie_byscuit").includes("functional")) { // votre code de setCookie }

Soit :