function loadSleeknote() { var s = document.createElement("script"); s.src = "https://sleeknotecustomerscripts.sleeknote.com/199798.js"; s.async = true; document.body.appendChild(s); } window.addEventListener("CookieInformationConsentGiven", function () { if (CookieInformation.getConsentGivenFor("marketing")) { loadSleeknote(); console.log("loadSleeknote"); } });