On this page
What this issue is
ITP is the tracking protection built into Safari on iPhone, iPad and Mac. One of its rules limits how long a cookie lives when it is created by JavaScript on the page (document.cookie). That is how most analytics and ad tags store their IDs, such as the GA4 _ga cookie, _gcl_aw for Google Ads click IDs and Meta's _fbp.
Why it costs you leads or sales
- Ad clickVisitor lands with a gclid
- Cookie set by JSClick ID stored in the browser
- Cookie expiresSafari deletes it after 7 days or 24 hours
- Return visitSeen as a new visitor
- PurchaseCredited to Direct, not the ad
The visit is tracked, but the later purchase has no link back to the ad click.
Example: share of Safari conversions still linked to the ad click, by how many days passed before the purchase. Numbers are illustrative.
How to check if your site has it
Open your site in SafariSafari
On a Mac, enable the Develop menu in Safari Settings > Advanced, then open Develop > Show Web Inspector.
Inspect the cookies
Go to the Storage tab > Cookies. Look at the Expires column for
_ga,_gcl_aw,_fbpand any click ID cookies.Compare with Chrome
Do the same in Chrome (Application > Cookies). If Chrome shows around 2 years for
_gaand Safari shows 7 days or less, ITP is capping it.Compare returning-visitor data
In GA4, compare Safari with Chrome for the share of Direct traffic and for the time between first visit and conversion. A much higher Direct share on Safari points to lost attribution.
| Cookie type | How it is set | Typical Safari lifetime |
|---|---|---|
| Analytics and ad cookies (_ga, _fbp, _gcl_aw) | JavaScript on the page | 7 days, or 24 hours after tracked-link arrival |
| First-party cookie set in a server response header | Your own server | Not capped by the JS rule, but Safari may limit it in some setups |
| Third-party cookies | Another domain | Blocked by default |
How to fix it
Store the source when you capture the lead
Save UTMs and click IDs (gclid, fbclid) in hidden form fields and in your CRM on the first form submission. That record does not expire in the browser.
Set key cookies from your server
Set your own visitor ID cookie in an HTTP
Set-Cookieheader from your domain, with a longer lifetime, rather than with JavaScript.Use server-side tagging
Run a server-side container (for example server-side Google Tag Manager on a subdomain of your site) and send conversions from the server to GA4, Google Ads and Meta.
Send offline or CRM conversions
Upload conversions with the stored click ID to Google Ads (offline conversion import) and use the Meta Conversions API, so a sale after day 7 can still be matched.
Expect some loss and set realistic attribution windows
Do not judge Safari-heavy campaigns on last-click data alone. Compare with blended revenue and CRM data.
Create a server container
In tagmanager.google.com choose Admin > Create Container > Server, and deploy it to a hosting option you control.
Use a custom subdomain
Point a subdomain of your own site (for example metrics.yoursite.com) at the server container so requests are first-party.
Move your tags
Send GA4 and ad platform events through the server container instead of directly from the browser.
Capture source in forms
Add hidden fields for utm_source, utm_campaign and gclid in your form plugin (many plugins support this; the exact setting depends on the plugin).
Pass it to your CRM
Map the hidden fields to CRM fields in the form's integration settings.
Use the platform's server-side connections
In Settings > Apps and sales channels, check the Google & YouTube and Facebook & Instagram channels for server-side or Conversions API options.
Store source on orders
Capture UTMs into cart attributes or order notes so the source stays with the order.
Set the cookie on the server
Send a Set-Cookie header with Secure, SameSite=Lax and a long Max-Age from your own domain. See the snippet below.
Forward events server-side
Call the GA4 Measurement Protocol and Meta Conversions API from your backend when a lead or order is saved.
Set-Cookie: vid=abc123; Max-Age=31536000; Path=/; Secure; SameSite=Lax; HttpOnlyHow to confirm it's fixed
- Your visitor ID cookie shows the longer expiry in Safari's Storage tab
- New leads in your CRM include UTM and click ID values
- Server-side events appear in GA4 DebugView or the Meta Events Manager test tool
- Safari's share of Direct traffic falls over the following weeks
- Conversions that happen more than 7 days after the click are still matched in Google Ads and Meta
How to prevent it happening again
- Review WebKit's tracking prevention notes a few times a year
- Keep hidden source fields in every lead form
- Compare Safari and Chrome cookie lifetimes after major releases
- Reconcile ad platform conversions against CRM sales monthly
How FunnelGuard handles this
Day 0
Visitor clicks a Google ad on an iPhone; a JS cookie stores the click ID.
Day 7
Safari removes the JavaScript-set cookie.
Day 10
Visitor returns directly and buys.
Day 10
Sale is reported as Direct; the ad gets no credit.
Questions people ask
What is Safari ITP and how does it affect cookies?
Intelligent Tracking Prevention is Safari's built-in privacy feature. It limits the lifetime of cookies written by JavaScript to 7 days, and to 24 hours in some cases where the visitor arrived through a link with tracking parameters. This shortens how long analytics and ad platforms can recognise a returning visitor.
Why is my GA4 showing so much Direct traffic from Safari?
One common cause is ITP deleting the cookies that tie a returning visitor to their original source. When the visitor comes back after the cookie has expired, GA4 sees a new user with no campaign data and labels it Direct. Compare Safari with Chrome to see the gap.
How do I fix the Safari 7-day cookie limit?
You cannot change Safari's rules, but you can reduce the loss. Store UTMs and click IDs in your CRM when a lead is captured, set your visitor ID from your own server, and send conversions server-side to GA4, Google Ads and Meta.
Does server-side tracking get around ITP?
It helps because cookies set by your own server in response headers are not subject to the JavaScript cookie cap, though Safari may still limit them in some setups. It is not a guaranteed bypass, and you still need consent where the law requires it.
Why do Safari conversions lose their Google Ads click ID?
The _gcl_aw cookie that holds the click ID is set by JavaScript, so ITP can expire it after 7 days or 24 hours. A later purchase then cannot be matched to the click. Saving the gclid with the lead and importing offline conversions avoids this.
Can FunnelGuard detect Safari ITP problems?
No. ITP expiry happens over days in real visitors' browsers, which a scheduled test visit does not reproduce. You need server-side tagging and browser-segmented analytics for this issue.
Does ITP affect all cookies the same way?
No. JavaScript-set first-party cookies are capped, third-party cookies are blocked by default, and server-set first-party cookies are treated differently. The exact rules change over time, so check current WebKit documentation.
Related issues
- TRK-378Tags blocked by ad blockers (no first-party fallback)Fix guide
- TRK-380iOS Link Tracking Protection strips gclid/fbclid in Mail/PrivateFix guide
- TRK-381Firefox ETP blocks tracker domainsFix guide
- TRK-383Third-party cookie deprecation breaks retargetingFix guide
- TRK-384Tracking breaks in in-app browsers (Instagram, TikTok)Fix guide
- TRK-382Brave strips known tracking paramsFix guide