var getCookie = function (name) { var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)')); if (match) { return decodeURIComponent(match[2]) }; } var setCookie = function (variable, value) { var d = new Date(); d.setTime(d.getTime() + (366 * 24 * 60 * 60 * 1000)); var expires = "; expires=" + d.toUTCString(); document.cookie = variable + "=" + (value || "") + expires + "; domain=." + domain + "; path=/"; } var urlParams = new URLSearchParams(window.location.search); var email = urlParams.get('email'); if (!email) { email = getCookie(cookieName); if (email !== "") { window.snowplow('setUserId', email); setCookie(cookieName, email); } } if (email) { window.snowplow('setUserId', email); setCookie(cookieName, email); } Util.addScript('https://files.curaytor.io/trees/cy-init.js'); //End of script, add other trackers below this line// };