ITP 2.1 Caps JavaScript Cookies at Seven Days

Cookies written by scripts, including first-party analytics cookies, now expired after seven days. A visitor who returned on day eight looked like a new user. ITP 2.2 cut that to one day for some ad-click traffic two months later.

SafariiOSWeb AnalyticsAttributionHigh impact

In short: Script-set first-party cookies expire after seven days

What Changed

In February 2019 WebKit announced ITP 2.1, which shipped in iOS 12.2.1 Until then ITP had targeted third-party cookies. ITP 2.1 went after a workaround: first-party cookies written by JavaScript.

Cookies created through the browser's document.cookie API, the method most analytics and advertising tags use, now expired after seven days, however long the tag asked to keep them. Cookies set by the website's own server in an HTTP response were not affected.

Two months later, ITP 2.2 went further for one common pattern. When a visitor arrived from a domain Safari classified as a tracker, with a click ID or other identifier added to the link, script-set cookies on the landing site expired after one day. In September 2019, ITP 2.3 closed the next workaround, trackers storing identifiers in localStorage instead: after the same kind of visit, the landing site's other script-writable data was deleted after seven days without interaction.2

Why It Mattered

Analytics tools store a visitor ID in a first-party cookie set by JavaScript. With a seven-day cap, a Safari visitor who came back on day eight looked like a new visitor. New-user counts rose, returning-visitor counts and lifetime metrics fell, and any conversion more than a week after the click lost its link to the original visit.3

Ad platforms that had moved their click tracking into first-party cookies to get around ITP 1.0 were caught by the same cap. Many advertisers responded by setting cookies from their own servers instead. One version of that, CNAME cloaking, points a subdomain of the advertiser's site, such as a "metrics" subdomain, at a tracking company's servers, so the tracker's cookies look first-party; WebKit said trackers had persuaded site owners to set it up precisely to get around tracking prevention. In November 2020, Safari 14 capped cookies set that way at seven days too.4

ITP 2.1 showed that "first-party" was no longer a safe harbour. What mattered to Safari was who set the cookie and for what purpose.

Safari's Cookie Limits at a Glance

For reference, every limit described on this timeline, from ITP 1.0 on:

  • Third-party cookies: blocked by default since 2020, with iOS 13.4.
  • First-party cookies set by JavaScript: expire after 7 days (ITP 2.1, 2019).
  • Script-set cookies after a click from a classified tracker with a link identifier: expire after 1 day (ITP 2.2, 2019).
  • localStorage and other script-writable storage: deleted after 7 days without interaction (ITP 2.3 for some traffic, 2019; all sites from 2020).
  • Cookies set through a CNAME pointing to a third party: expire after 7 days (2020).

Notes

  1. John Wilander, “Intelligent Tracking Prevention 2.1,” WebKit Blog, February 21, 2019, https://webkit.org/blog/8613/intelligent-tracking-prevention-2-1/. ↩
  2. John Wilander, “Intelligent Tracking Prevention 2.3,” WebKit Blog, September 23, 2019, https://webkit.org/blog/9521/intelligent-tracking-prevention-2-3/. ↩
  3. Simo Ahava, “ITP 2.1 and Web Analytics,” Simo Ahava’s Blog, February 28, 2019, https://www.simoahava.com/analytics/itp-2-1-and-web-analytics/. ↩
  4. John Wilander, “CNAME Cloaking and Bounce Tracking Defense,” WebKit Blog, November 12, 2020, https://webkit.org/blog/11338/cname-cloaking-and-bounce-tracking-defense/. ↩

Where This Fits

Read the Full Timeline

7 of 49 changes, 2012–2026

You’re reading · ITP 2.1 Caps JavaScript Cookies at Seven Days
  1. Safari · Sep 2017 · 1.5 years earlieriOS 11 Ships Intelligent Tracking PreventionCross-site cookies from classified trackers partitioned or purged
  2. You’re here · Feb 2019
  3. Safari · Mar 24, 2020 · 1 year lateriOS 13.4 Blocks All Third-Party CookiesAll third-party cookies blocked by default

Measurement That Keeps Up with Every Tracking Change

Bconic combines attribution, incrementality and marketing mix modelling, so you can see what your marketing drives on every platform, whatever changes next.