On this page
What this issue is
An iframe is a page from one site embedded inside another. If your checkout, login, booking widget or payment form lives on a different domain from your page, the browser treats any cookie it sets as a third-party cookie.
Safari on iPhone, iPad and Mac blocks these cookies by default. Firefox and Brave also restrict them, and Chrome is changing how it handles them. The embedded app sets a session cookie, Safari drops it, and the next request looks like a new visitor.
Typical symptoms: the login form reloads without an error, the cart inside the frame is empty, a payment frame shows a spinner forever, or the widget says cookies must be enabled.
Why it costs you leads or sales
Safari is a large share of mobile traffic in many markets, especially on iPhone. Everyone on it who reaches an embedded step can get stuck, and they rarely tell you. They just leave.
The problem is easy to miss because it works for you on desktop Chrome, which is where most teams test. Your analytics show visits to the checkout page, but orders from Safari quietly drop.
- Ad clickVisitor lands on your page in Safari
- Page with iframeEmbedded checkout or login loads from another domain
- Session cookieSafari blocks the third-party cookie
- Login or paymentLoop, empty cart or failed request
- Order / leadNever completed
The page loads, but the iframe cannot keep its session cookie, so everything after it is lost.
Example: illustrative numbers showing how an embedded checkout can complete far less often in Safari than in Chrome.
How to check if your site has it
List your embeds
Find every iframe on key pages: checkout, login, booking, payment, chat, membership. In your browser, open DevTools and search the Elements panel for <iframe>.
Note the iframe domain
If the src domain differs from your site's registrable domain (for example pay.vendor.com on shop.example.com), cookies set inside it are third-party.
Run the journey in real Safari
Use an iPhone or a Mac with Safari. Browsers that merely mimic Safari's size in Chrome do not apply ITP. Complete a login, add to cart and start checkout.
Inspect the cookiesSafari
On a Mac, enable Develop menu in Safari Settings > Advanced, then open Web Inspector > Storage > Cookies and the Console. Look for blocked cookie messages and failed requests (401 or 403) from the iframe.
Compare with a private windowSafari
Try the flow with Settings > Privacy > Prevent cross-site tracking on and off. If it only works with it off, ITP is the cause.
How to fix it
The reliable fix is to make the cookie first-party. That means the embedded app sets its cookies on a domain that matches your site, or the flow leaves the iframe altogether. Do not rely on telling visitors to change Safari settings.
Replace the iframe with a redirect
Send the visitor to the vendor's hosted page (hosted checkout or login) and return them to your site afterwards. The page is then top-level, so its cookies are first-party.
Use a custom subdomain for the vendor
Many vendors let you serve their app from your own subdomain, such as checkout.yourdomain.com, using a CNAME record. Cookies then count as same-site. Check your vendor's documentation for custom domain support.
Open the step in a popup or new tab
Launch login or payment as a top-level window and pass the result back with a redirect or postMessage. Trigger it from a real click so popup blockers allow it.
Pass state without cookiesCustom code
If you build the embed yourself, use tokens in the URL or in request headers instead of cookies, and keep them short-lived. Do not put secrets in query strings that get logged.
Request storage access as a last resortCustom code
The Storage Access API lets an iframe ask for cookie access after a user gesture. Safari shows a prompt and support varies, so treat it as a fallback, not the main fix.
Find the embed
Check the page builder block, a Custom HTML block or a plugin shortcode that outputs an iframe.
Switch to a link or hosted page
Many membership, booking and payment plugins offer a hosted page or redirect mode in their settings. Choose it over the embedded option.
Keep checkout on Shopify's own flow
Shopify checkout runs on your store domain. If you added a third-party checkout or login app in an iframe, look in the app's settings for a redirect or custom domain option, or replace it.
Check theme embeds
Look in Online Store > Themes > Edit code for <iframe> tags around reviews, loyalty or account widgets, and test those in Safari too.
Review Embed elements
Open the Navigator and look for Embed elements containing iframes. Replace them with a button that links to the hosted page.
Use a custom domain
If the vendor supports it, point a subdomain of your site to their service.
Use your custom domain
Connect your own domain to funnels, forms and calendars in the settings so they are served first-party.
Avoid embedding on other sites
Where possible, link to the funnel page directly instead of embedding a form or calendar in an iframe on a different domain.
Check HTML embeds
Find any Embed code or Embed a site element. Replace it with a link button to the vendor's hosted page.
Check Code blocks
Look for Code blocks and Embed blocks with iframes. Swap them for a button that opens the hosted page.
Serve from the same site
Host the app on a subdomain of your main domain and set cookies with the right Domain attribute, Secure and SameSite=Lax.
Know what SameSite=None does
SameSite=None; Secure allows cross-site cookies in some browsers, but Safari may still block them. It does not fix ITP on its own.
async function ensureCookieAccess() {
if (!document.hasStorageAccess) return true;
if (await document.hasStorageAccess()) return true;
try {
await document.requestStorageAccess(); // must run from a click
return true;
} catch (e) {
return false; // fall back to opening the flow in a new tab
}
}
document.querySelector('#sign-in').addEventListener('click', async () => {
if (!(await ensureCookieAccess())) {
window.open('https://checkout.example.com/login', '_blank');
}
});Before
- Checkout loads in an iframe from vendor.com
- Safari blocks its session cookie
- Cart is empty or login loops
After
- Checkout served from checkout.yourdomain.com or a hosted page
- Cookie is first-party
- Session survives to payment
Blocked (embedded iframe)
Leads or data lost
The iframe loses its session. Visitors loop at login or see an empty cart and leave.
Toggle to see how cookie context changes the result.
How to confirm it's fixed
- Complete the full journey on a real iPhone in Safari: login, cart, checkout up to the payment step.
- Repeat on Safari for Mac with Prevent cross-site tracking turned on.
- Confirm the Web Inspector shows no blocked cookie warnings and no 401 or 403 responses.
- Check that the visitor returns to your site after a redirect or popup, with the cart intact.
- Verify your conversion events still fire on the thank-you page.
- Test again in Chrome and Firefox to make sure nothing regressed.
How to prevent it happening again
- Keep a list of every third-party embed on revenue pages and who owns it.
- Ask vendors whether they support a custom domain or hosted page before you add an embed.
- Add a real Safari iPhone run to your release checklist for checkout, login and booking changes.
- Re-test after vendor updates, theme changes or new apps.
- Compare conversion rates by browser in your analytics every month and investigate Safari dips.
How FunnelGuard handles this
FunnelGuard does not check for Safari third-party cookie blocking yet. It is a possible future check, so do not rely on it for this problem today.
What FunnelGuard does do nearby: a robot visitor runs your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, and checks each step. It also checks the tracking hits sent to GA4, Google Ads, Meta and other platforms, and whether test leads reach your inbox and CRM. If a step visibly fails or a conversion hit stops, a failure is re-checked from a second region and you get one alert with a screenshot and a likely cause. That can show a broken checkout, but it does not tell you the cause is Safari's cookie rules.
To watch for this problem yourself, test on a real iPhone after each release, and compare checkout completion by browser in GA4 (Reports > Tech > Tech details, with Browser as the dimension). A Safari rate far below Chrome is a signal to investigate. A free read-only website audit and a Free plan (1 site, 2 journeys, daily checks, no card) are available if you want regular journey checks alongside this manual testing.
Day 0
Embedded checkout or login is added and tested in Chrome. It works.
Day 1
Safari visitors hit a login loop or empty cart inside the iframe.
Week 2
Safari conversion rate looks low, but nobody has reported an error.
Week 3
A real iPhone test shows the cause. The flow moves to a hosted page.
Questions people ask
Why is my embedded checkout not working in Safari?
Safari blocks third-party cookies by default through Intelligent Tracking Prevention. If your checkout loads in an iframe from another domain, its session cookie is dropped and the cart or login fails. Serve the checkout from your own domain or use a hosted page redirect.
Why does my login iframe keep looping on iPhone?
The iframe sets a session cookie after you sign in, but Safari does not store it because it is third-party. The next request looks logged out, so the login screen appears again. Move login to a first-party page or a popup.
Does SameSite=None fix Safari blocking cookies in an iframe?
Not reliably. SameSite=None; Secure lets other browsers send a cookie in cross-site contexts, but Safari's ITP can still block it. A first-party domain or redirect flow is the dependable fix.
How do I test third-party cookie blocking in Safari?
Use a real iPhone or Safari on a Mac. Run the full flow, then check Web Inspector for blocked cookie warnings and failed requests. You can also compare results with Prevent cross-site tracking turned off in Safari's privacy settings.
What is the Storage Access API?
It is a browser feature that lets an embedded iframe ask for access to its cookies after a user click. Safari may show a prompt, and support differs between browsers. Use it as a fallback, not as your main solution.
Should I tell customers to turn off Safari's cross-site tracking prevention?
No. Most visitors will not change privacy settings, and asking them to adds friction and distrust. Fix the flow on your side with a first-party setup.
Does FunnelGuard detect Safari third-party cookie problems?
No, not yet. It is a possible future check. FunnelGuard does run your journeys on a schedule and alerts you if a step fails, but it does not identify Safari cookie blocking as the cause.
Related issues
- PRF-191Page broken in Safari (iOS/macOS)Fix guide
- PRF-194Page broken in in-app browsers (Instagram/Facebook/TikTok webview)Fix guide
- PRF-203Emails/links open in new tab breaking in-app browser flowFix guide
- PRF-197Apple Pay/Google Pay button missing on supported deviceFix guide
- PRF-192Page broken in FirefoxFix guide
- PRF-193Page broken in Samsung InternetFix guide