Cookie preferences

Choose which optional cookies EndFrame may use on this site. Analytics and advertising tools load only if you allow them, and you can change your mind any time from “Cookie settings” in the footer. Whatever you choose, this tab keeps the campaign labels from the link that brought you, and they are saved with your account if you sign up. Read the Cookie Policy.

Needed for the site to work, such as remembering this choice. Always on.

Lets us load analytics tools through Google Tag Manager, including Google Analytics and Microsoft Clarity session recordings, to understand how the site is used.

Allows advertising tags to measure our ad campaigns. None run on this site today. It also keeps ad click IDs from the page address for this tab, and saves them with your account if you sign up.

Skip to main content

Safari ITP and Cookie Lifetimes: The 7-Day and 24-Hour Caps and What They Do to Attribution

Safari limits how long cookies set by tracking scripts can live, and the limits are shorter than most attribution windows. This guide sets out each rule as WebKit documents it, which ad cookies it touches, and what you can do about the gap.

The EndFrame Team5 min read

Your Safari and iPhone traffic converts, your store records the sales, and yet the ad platforms credit fewer of them to campaigns than they do for Chrome users, especially when the purchase comes a week or more after the click. The cause is usually Intelligent Tracking Prevention (ITP), WebKit's set of tracking defences, and specifically the limits it places on how long cookies can live. This guide describes those limits as WebKit's own documentation states them, shows which advertising cookies they hit, and explains what it means for attribution. For how much data this costs in practice, see our breakdown of how much conversion data iOS, Safari and ad blockers lose.

The rules, from WebKit's documentation

ITP has changed many times since 2017. The current behaviour is summarised on WebKit's Tracking Prevention page, and the individual rules were introduced in a series of WebKit blog posts. These are the ones that affect cookie lifetimes.

RuleWhat it doesIntroduced
Seven-day cap on script-set cookiesPersistent cookies created through document.cookie get a maximum expiry of seven days; shorter expiries are keptITP 2.1
24-hour cap after link decorationCookies created in JavaScript on a landing page get a maximum expiry of one day when a classified tracking domain navigated the user there and the final URL has a query string or fragmentITP 2.2
Seven-day deletion of script-writable storageCookies created in JavaScript and storage such as LocalStorage and IndexedDB are deleted after seven days of Safari use without user interaction on the site2020 update
CNAME and IP address cloaking defenceCookies set in HTTP responses from a third party disguised as a first-party subdomain are capped at seven daysSafari 14 for CNAME, extended later to IP addresses
Third-party cookie blockingThird-party cookies are blocked by default2020 update

The seven-day cap

Cookies can be set two ways: by the server in an HTTP response, or by JavaScript running on the page. WebKit's ITP 2.1 post explains that all persistent cookies created through document.cookie are capped to a seven-day expiry. If the script asks for 90 days, Safari stores it for seven. Since almost every ad pixel sets its cookies with JavaScript, this is the rule that affects most advertisers.

The later script-writable storage rule closed the obvious workaround. When trackers moved identifiers into LocalStorage, which has no expiry at all, WebKit started deleting all of a site's script-writable storage after seven days of Safari use without user interaction on that site. A visitor who comes back within the week and clicks or taps resets the counter. One who does not loses the stored identifiers.

The 24-hour cap and link decoration

ITP 2.2 targeted click IDs specifically. WebKit describes link decoration as trackers adding identifiers such as click IDs to outgoing links, then reading them with JavaScript on the destination site and storing them. When ITP's classifier has marked the referring domain as having cross-site tracking capabilities, and the landing URL carries a query string or fragment, cookies created in JavaScript on that landing page are capped at 24 hours.

Classification happens on the device, based on browsing patterns, so you cannot look up whether a given ad platform is classified for a given user. WebKit's own example is a social network adding a click ID to every outbound link, which describes the pattern ad platforms use. Plan on the assumption that some of your paid social traffic in Safari falls under the 24-hour rule.

Which advertising cookies are affected

  • Meta _fbc and _fbp: set by the Meta Pixel in JavaScript on your domain, so subject to the script-set cookie caps. Our guide to fbclid, _fbc and _fbp explains what each holds.
  • Google _gcl_aw and related conversion linker cookies: also written by JavaScript, so capped the same way.
  • Google Analytics _ga: script-set, so a Safari visitor who returns after the cap expires appears as a new user.
  • TikTok and other pixel cookies that store click IDs or browser IDs: the same rules apply wherever the cookie is written by script.
  • Third-party cookies on ad platform domains: blocked outright in Safari by default.

What this does to attribution

Ad platforms attribute conversions inside a window, often longer than seven days and sometimes much longer. Our explainer on attribution windows lists the defaults per platform. If the cookie holding the click ID expires before the conversion happens, the browser has nothing left to connect the purchase to the click. The conversion still happens, and your back office records it, but the pixel fires without a click identifier and the platform either cannot attribute it or estimates it through modelling.

The effect grows with the length of your sales cycle. An impulse purchase within the hour is barely touched. A considered purchase that takes ten days, or a lead that converts after a sales call, is likely to lose its browser-side click ID in Safari. Returning-visitor counts and frequency metrics in analytics also inflate, because the same person looks new each time their identifier is deleted. Platform reports and your own sales data drift apart for Safari users first, which is often the first visible symptom: Chrome and Safari traffic convert at similar rates in your store, but the ad platform credits far fewer Safari conversions.

What does not work

The tempting fix is to move cookie-setting to a subdomain that points at a vendor's servers. WebKit closed this in Safari 14: cookies set in responses from a third party behind a CNAME record are capped at seven days, and its tracking prevention page extends the same treatment to third-party IP address cloaking. WebKit's Tracking Prevention Policy also states that it treats circumvention of its anti-tracking measures with the same seriousness as exploitation of security vulnerabilities, and may add restrictions without notice. Workarounds built to extend tracking identifiers are fragile by design.

What does work

  1. 1Capture click IDs and UTM parameters on landing and store them with the visit in your own systems, so the record does not depend on a browser cookie surviving.
  2. 2Attach the stored campaign data to the lead or order when the conversion happens, with the visitor's consent where required.
  3. 3Send conversions server-side through conversions APIs, including hashed email or phone collected at conversion, which the platform can match without any cookie. Our comparison of server-side vs client-side tracking explains the model.
  4. 4Keep the browser pixel running alongside, with a shared event ID, so short-window conversions still carry browser identifiers.
  5. 5Read Safari-heavy segments with the cap in mind, and do not judge long-cycle campaigns on browser-attributed conversions alone.

If you want a rough sense of how much this matters for your account, our conversion recovery calculator lets you plug in your own traffic mix. ITP is not going away, and WebKit has tightened it repeatedly. The measurement that holds up is the kind built on data your customers give you at the point of conversion, sent deliberately, rather than on how long a script-set cookie can be made to last.

Frequently asked questions

Does ITP affect cookies set by my own server?

Not by the seven-day or 24-hour caps on script-set cookies, which apply to cookies created in JavaScript. WebKit does cap cookies set in HTTP responses when the server is a third party disguised as a first-party subdomain through a CNAME record or a third-party IP address. Cookies set by a server you genuinely operate on your own site are not capped by those rules.

Does ITP apply on iPhone as well as Mac?

Yes. ITP is part of WebKit, the engine behind Safari on macOS, iOS and iPadOS, and it is on by default. Users can turn off cross-site tracking prevention in Safari settings. Web apps added to the home screen are treated separately and are exempt from the seven-day storage deletion.

Why do my Safari conversions drop after a week?

Because a click ID stored in a script-set cookie, such as Google's _gcl_aw or Meta's _fbc, expires after seven days at most in Safari, and can be gone after 24 hours if link decoration rules apply. A purchase after that can no longer be tied to the click by the browser alone, so the platform reports it as unattributed or models it.

Try EndFrame

Add a server-side path for your conversions.

EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.

No credit card required

Keep reading