Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Safari blocks third-party cookies: fix broken login and checkout iframes

PRF-195High impactCould addBy FunnelGuardPublished Updated
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.

Where an embedded checkout breaks in Safari
  1. Ad clickVisitor lands on your page in Safari
  2. Page with iframeEmbedded checkout or login loads from another domain
  3. Session cookieSafari blocks the third-party cookie
  4. Login or paymentLoop, empty cart or failed request
  5. Order / leadNever completed

The page loads, but the iframe cannot keep its session cookie, so everything after it is lost.

Completion rate by browserExample numbers
Completion rate by browser (example)Chrome desktop: 3.1 %; Safari iPhone: 0.9 %; Safari Mac: 1.2 %0123.10.91.2Chrome desktopSafari iPhoneSafari Mac%

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

Test your embedded flow in Safari
  1. 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>.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Fix options, from most to least reliable
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Where to change it on common platforms
  1. Find the embed

    Check the page builder block, a Custom HTML block or a plugin shortcode that outputs an iframe.

  2. 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.

Storage Access API fallback inside an iframejavascript
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');
  }
});
Embedded versus first-party flow

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
Third-party cookie in an iframeInteractive
Safari blocks third-party cookies

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

Confirmation checks
  • 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

Prevention habits
  • 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.

How the problem usually unfolds
  1. Day 0

    Embedded checkout or login is added and tested in Chrome. It works.

  2. Day 1

    Safari visitors hit a login loop or empty cart inside the iframe.

  3. Week 2

    Safari conversion rate looks low, but nobody has reported an error.

  4. 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.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.