Update requirements due to Safari's Internet Tracking Prevention (ITP) Policy
Apple’s Internet Tracking Prevention policy (ITP) update on March 24th forces an expiration of 7 days to first-party cookies or any other script-writeable storage, including the localStorage.
To overcome this ITP limitation, the DYID cookie should be set by the backend application serving your website on your domain. Cookies set this way are not affected by ITP and can have a longer expiration.
What You Need To Do
- When a user visits your site, a request is sent from the browser to the backend application serving your site. For returning users, the request includes the _dyid cookie (together with all other first-party cookies).
- When receiving this request, within your backend application, duplicate the _dyid cookie value into a new cookie. Use the key _dyid_server and return the new cookie as a response header for this request, setting a 1-year expiration date. This will set the _dyid_server cookie as a server-side first-party cookie in the user’s browser which, as recommended by the ITP policy, is not affected by the cookie expiration enforcement.
- Our script will use the _dyid_server cookie as it runs on your page and as a result, no returning-user data will be lost, even if the user has not visited your site for over 7 days.
If you have any questions on this topic, please share them with us!
Por favor, entrar para comentar.
Comentários
0 comentário