URL: https://upnorthlive.com/watch
, body: JSON.stringify({uuid: uuid, ssoEnabled: true}) }) .then(response => response.json()) .then(data => data.uuid) .catch(error => console.warn('There was an error!', error)) : Promise.resolve(uuid) ).then(uuid => { console.log('uuid from ID ppid api:', uuid); var date = new Date(); date.setTime(date.getTime() + (180 * 24 * 60 * 60 * 1000)); var expires = 'expires=' + date.toUTCString(); var path = 'path=/'; var cookieString = 'SUID=' + [uuid, expires, path].join('; '); var sameSiteSecure = true ? '; SameSite=None; Secure' : ''; var partitionedCookie = undefined ? '; Partitioned;' : ''; console.log('ppid cookie string ', cookieString + sameSiteSecure + partitionedCookie); document.cookie = cookieString + sameSiteSecure + partitionedCookie; if (uuid) { window.dataLayer.push({ 'event': 'user_id', 'user_id': uuid, 'test': true }); } })