var otherUid = ""; function setCookie(name, val) { document.cookie = `${name}=${val};domain=.${window.CURRENT_TLD};path=/;`; } if (otherUid) { setCookie("uid2", otherUid); }