ITP / First Party Cookies (EN)

Introduction

ITP, or Intelligent Tracking Prevention, is a Safari prevention method for tracking visitors to websites over long periods of time. The practical consequences are:

  • Third party cookies in Safari are blocked completely

  • First party cookies in Safari that are created via the browser are only stored for 7 days after the last interaction

  • Localstorage values disappear in Safari after 7 days of no interaction with the website

Other browsers are less restrictive. For more detailed information, see Cookie Status where you can check the exact restrictions per browser.

Impact on Squeezely data

This has several consequences for the correct measurement of your visitors, for now only Safari visitors but in the future possibly more browsers. For all visitors without a userid (often the majority), the cookie will be deleted after 7 days of no interaction with your website. If the user visits your website afterwards, he will get a new profile in Squeezely.

By splitting users up per 7 days, you obviously lose a lot of individual data and personal recommendations, but the algorithm as a whole is also less accurate and the items you may like and recommended for you product sets will not function optimally.

Moreover, in cookies we also keep track of which personalisations someone has already seen, so that they don't see a personalisation more than once that was only meant to be seen once

The market share of Safari on desktops is not that big, but on mobile it is quite significant because of iPhones. Firefox also uses a prevention method, although this is less strict, a similar impact may be measured in the future

The most important rule from ITP for Squeezely is:

For cookies set with document.cookie, deletion happens after 7 days of browser use without user interaction on the site.

This means that if you set a cookie independently of the browser, i.e. at the server level, this rule does not apply. This way you can set a long term expiration date and ITP will not override it. This means that you have to retrieve the cookie created by us and then write it at the server level with a new expiration date, for example two years. The relevant cookies are:

  • sqzllocal (the visitor's unique ID that we use to identify him in Squeezely)

  • sqzl_vw (information about which personalization was seen by the visitor and when)

Sample code

Please note that you will not be able to copy this code and it is dependent on your own environment, it is for illustration purposes only.

 

app.get('/', (req, res) => { // Haal bestaande cookies op let sqzllocal = req.cookies['sqzllocal']; let sqzlvw = req.cookies['sqzl_vw']; // Check of de cookie bestaat, zoja, overschrijf de cookie vanuit de server if (sqzllocal) { res.cookie('sqzllocal', sqzllocal, {domain: 'jouwdomein.nl', path: '/', secure: true, expires: new Date(Date.now() + 1000*60*60*24*365*2), }); } if (sqzlvw) { res.cookie('sqzl_vw', sqzlvw, {domain: 'jouwdomein.nl', path: '/', secure: true, expires: new Date(Date.now() + 1000*60*60*24*365*2), }); } res.render('index'); });