var string_cookie_result = null; var key = 'gret'; var key_value = get_cookie(key) if (key_value !== undefined) { string_cookie_result = key_value } else { string_cookie_result = localStorage.getItem(key) } if (string_cookie_result !== null) { document.cookie = key+"="+string_cookie_result+"; max-age=2592000"; localStorage.setItem(key, string_cookie_result) dmpFingerprintJSReady(JSON.parse(string_cookie_result)); } else { var scriptIdDmp = document.createElement("script"); scriptIdDmp.async = true; scriptIdDmp.src = "https://id.dmp.one/sync.js?k=1692887258"; scriptIdDmp.onload = function() { FingerprintJS.load({ token: 'ztNGFJIoRboJ1IGkK4G5', endpoint: "https://c.dmp.one", storageKey: "_dmp_key", region: "eu" }) .then(fp => fp.get({ extendedResult: true })) .then(result => { var string_cookie_result = JSON.stringify(result); document.cookie = key+"="+string_cookie_result+"; max-age=2592000"; localStorage.setItem(key, string_cookie_result) dmpFingerprintJSReady(result); }); } document.head.appendChild(scriptIdDmp); } function get_cookie(name) { var matches = document.cookie.match( new RegExp( "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") + "=([^;]*)" ) ); return matches ? decodeURIComponent(matches[1]) : undefined; }