On this page
What this issue is
A cookie is a small piece of data a site stores in the browser, often to remember who is logged in. The SameSite attribute tells the browser when it may send that cookie on requests that come from another site.
There are three values: Strict (only same-site requests), Lax (same-site plus top-level link navigation) and None (always, but only with the Secure flag, so over HTTPS). Modern browsers treat a cookie with no SameSite value as Lax.
An iframe from another domain, for example a payment page, booking widget or login box embedded in your page, is a cross-site context. Its cookies need SameSite=None; Secure. Without it, the browser drops the cookie and the embedded page behaves as if the visitor is new.
Why it costs you leads or sales
The failure is quiet. The iframe loads, but the login loops back to the sign-in form, the cart inside the embed is empty, or the payment step says the session expired. The visitor rarely sees an error message and simply leaves.
It often appears only in some browsers or after a browser update, so the team that built it may never see it. Safari and Firefox also restrict third-party cookies in their own ways, which can add to the problem.
- Visitor opens pagePage on your domain loads
- Iframe loadsCheckout or login from another domain
- Session cookie droppedSameSite=Lax blocks it in a cross-site frame
- Login or cart stepTreated as a new visitor
- Purchase or leadNever completed
The cookie is set but never sent back from inside the iframe.
Example: share of visitors who finish an embedded checkout before and after the cookie fix. Numbers are illustrative.
How to check if your site has it
Open the page with the iframe
Use a normal window on the live page where the embed appears, in Chrome or another Chromium browser.
Open DevTools
Press F12, go to the Application tab, then Cookies. Select the domain of the embedded service, not only your own.
Read the SameSite column
Session or login cookies showing Lax, Strict or empty are the suspects. They should show None with the Secure box ticked.
Look for blocked cookie warnings
In the Network tab, click the iframe request and open Cookies. A yellow warning icon means the cookie was blocked, and hovering it states the SameSite reason.
Test the real journey
Log in or add to cart inside the iframe. If you are sent back to the login form or the cart is empty, the session is being lost.
How to fix it
You can only change cookies that your own server or the embedded service sets. If a third-party tool sets them, its settings or support team must change them. Pick the route that matches how the embed is built.
| Cookie purpose | Used in a cross-site iframe? | Recommended value |
|---|---|---|
| Session or login for embedded app | Yes | SameSite=None; Secure |
| Cart or checkout token in the frame | Yes | SameSite=None; Secure |
| Admin login on your own site | No | Lax (or Strict) |
| Cookie never needed in the frame | No | Leave as Lax |
Find who sets the cookie
Check the cookie name in DevTools. If a plugin (membership, LMS, checkout) sets it, look in its settings or documentation for a SameSite option and update the plugin.
Set it in code if you control the cookie
In a small plugin or functions.php, pass an options array to setcookie() as shown in the PHP example below. Requires PHP 7.3 or newer.
Make sure the site uses HTTPS
SameSite=None is ignored without Secure, and Secure needs HTTPS across the whole site.
Know what you can change
Shopify sets its own cart and checkout cookies and you cannot edit them. Shopify checkout is not meant to be embedded in a third-party iframe.
Remove the iframe where possible
Link to the store checkout directly or use a Shopify-supported buy button instead of framing checkout.
Check apps that embed login
If a customer-account or loyalty app uses an iframe, ask the app developer about its SameSite handling.
Check tags that write cookies
A Custom HTML tag that sets a cookie with document.cookie must include SameSite=None; Secure if the cookie is read inside an iframe.
Update the cookie string
Use the JavaScript example below, then publish the container and test in Preview mode.
Identify the embed
Webflow does not let you edit cookies set by third-party embeds such as booking or login widgets. Open the widget vendor's settings.
Enable the vendor's cross-site cookie option
Look for a setting about embedding, cookies or SameSite. If none exists, contact the vendor.
Use a full-page link as fallback
Replace the embed with a button that opens the tool on its own page.
Check how the form or calendar is embedded
If you frame a GoHighLevel funnel or calendar inside another site, test the journey on that host site.
Prefer a link or custom domain
Open the funnel on its own page or on a custom domain that matches the page, so cookies are first-party.
Accept the platform limit
Wix manages its session cookies and does not expose SameSite settings.
Avoid framing logins from other domains
If a third-party login sits in an HTML embed, replace it with a button that opens it in a new tab.
Accept the platform limit
Squarespace sets its own cookies and offers no SameSite control.
Replace framed tools with links
For third-party scheduling or login embedded via a Code block, link out to the tool instead of framing it.
Add the attribute where the cookie is set
Update the Set-Cookie header in your server code or framework session config. Examples below.
Always pair None with Secure
Browsers reject SameSite=None without Secure. Serve everything over HTTPS.
Consider CHIPS
For embedded widgets you own, adding the Partitioned attribute keeps the cookie working under newer third-party cookie rules.
Set-Cookie: session_id=abc123; Path=/; Secure; HttpOnly; SameSite=Nonesetcookie('session_id', $value, [
'expires' => time() + 3600,
'path' => '/',
'secure' => true,
'httponly' => true,
'samesite' => 'None',
]);document.cookie = 'embed_session=abc123; path=/; max-age=3600; Secure; SameSite=None';Broken
- Session cookie has no SameSite value, so it defaults to Lax
- Iframe request arrives without the cookie
- Login loops or cart shows empty
Fixed
- Cookie sent with SameSite=None; Secure
- Iframe request carries the session
- Login and checkout continue to the final step
Lax (default)
Leads or data lost
The browser withholds the cookie inside the iframe. The visitor is logged out or sees an empty cart.
Toggle to see how the SameSite value changes what the embedded page receives.
How to confirm it's fixed
- In DevTools, Application, Cookies, the session cookie shows SameSite None and Secure ticked
- No blocked-cookie warning appears on the iframe request in the Network tab
- You can log in inside the iframe and stay logged in after the next step
- A test item stays in the cart through the embedded checkout
- The journey also works in a private window and in Safari or Firefox
- The site loads fully over HTTPS with no mixed content warnings
How to prevent it happening again
- List every iframe on login, booking and checkout pages and note who sets its cookies
- Re-test embedded journeys after browser, plugin, theme or vendor updates
- Prefer first-party pages or a matching custom domain over framing another site
- Set SameSite explicitly instead of relying on the browser default
- Add the cookie check to your release checklist whenever session code changes
- Run the journey on a schedule so a break is caught within a day, not after a sales dip
How FunnelGuard handles this
FunnelGuard detects this issue only partly. Its robot visitor runs your real journey on a schedule, and the check for this issue runs in Chromium only. If the login or checkout inside an iframe breaks in that browser because of cookie settings, the journey step fails, you get one alert after a re-check from a second region, with a screenshot and a likely cause.
Day 0
Embedded login is built and works in testing
Week 8
A browser update or vendor change enforces SameSite rules on the cookie
Week 8-10
Logins loop and carts empty, but no error is shown
Week 10
Team spots lower sales and checks the cookie
Week 10
SameSite=None; Secure is applied and the journey works again
Questions people ask
Why does my iframe login keep sending me back to the login page?
The session cookie is most likely set as SameSite=Lax or Strict, or with no value at all. Browsers do not send those cookies inside a cross-site iframe, so each request looks logged out. Setting SameSite=None; Secure on the session cookie fixes it.
What does SameSite=None; Secure mean?
SameSite=None lets the browser send the cookie on cross-site requests, such as from an iframe. The Secure flag restricts it to HTTPS connections. Browsers ignore SameSite=None if Secure is missing.
Why is my embedded checkout cart empty?
The cart is usually tied to a session cookie that the iframe cannot read because of its SameSite value. The embedded page then starts a new, empty session. Check the cookie in DevTools under Application, Cookies, and look for a blocked-cookie warning.
Which SameSite value is the default?
Current Chromium-based browsers treat a cookie with no SameSite attribute as Lax. That is why older embeds that never set a value can suddenly stop working in an iframe.
Will SameSite=None fix the problem in Safari and Firefox?
Not always. Safari and Firefox apply their own limits on third-party cookies, so a correctly set cookie can still be blocked in an iframe. The reliable fix is to host the login or checkout on your own domain or open it in a full page.
How do I check if a cookie is blocked in an iframe?
Open Chrome DevTools, go to the Network tab, click the iframe request and open its Cookies panel. A warning icon on a cookie means it was blocked, and the tooltip gives the reason, such as a SameSite problem.
Can I change SameSite on Shopify, Wix or Squarespace cookies?
No, these platforms set their own cookies and do not expose a SameSite option. Avoid framing their checkout or login on another site, and link to the page directly instead.
Does FunnelGuard detect SameSite cookie problems?
Only partly. It runs the journey in Chromium and flags a failed step if the embedded login or checkout breaks there. It does not test Safari or Firefox, so check those by hand.
Related issues
- CNV-376Session cookie lost between stepsFix guide
- CNV-380CSRF token expired, form rejects submitFix guide
- CNV-383Cookie consent state not respected after choiceFix guide
- CNV-379localStorage required, fails in private modeFix guide
- CNV-381Cached page serves stale CSRF/nonce (WordPress cache)Fix guide
- CNV-377Cookie too large, server 400 errorFix guide