On this page
What this issue is
A session cookie is a small piece of data your browser stores and sends back with every request. The server uses it to recognise the same visitor across pages. It holds things like a cart ID, a login or the answers from step 1 of a form.
The cookie is 'lost between steps' when the browser does not save it, does not send it on the next request, or the server replaces it with a new one. The site then treats the visitor as new. Nothing looks broken on screen until the visitor reaches the step that needs the data.
Common causes: a cookie set on www.example.com but the next step is on example.com; a checkout on another domain or subdomain; a Secure cookie set over plain HTTP; a wrong SameSite value; a caching layer that strips Set-Cookie; and a redirect that sends the visitor to a different host.
Why it costs you leads or sales
The visitor has already decided to act. They add to cart, fill step 1 and click next. If the cart is empty or the form restarts, most will not start again. Because the page still loads, you get no error, only fewer conversions.
- Product pageSession cookie set
- Add to cartCart saved to session
- CheckoutCookie not sent, cart empty
- PaymentNever reached
- Thank-you pageNo purchase tracked
The cookie is set on the product page but dropped when the visitor moves to checkout.
Example: 100 visitors add to cart. With the cookie lost at checkout, almost none can continue.
How to check if your site has it
Open a clean window
Use a private window with no extensions so old cookies do not hide the problem.
Open dev tools
Press F12, go to Application (Chrome, Edge) or Storage (Firefox), and select Cookies for your domain.
Start the journey
Add a product to the cart or complete step 1 of the form. Note the session cookie name and value (for example PHPSESSID, woocommerce_cart_hash, a platform cart token or your own).
Move to the next step
Check whether the same cookie is still there with the same value. Also look at the host in the address bar: did it change between www and non-www, or to another domain?
Inspect the response headers
In the Network tab, click the request for the next step. Look at Set-Cookie in the response and Cookie in the request. A new Set-Cookie with a new value means the session was reset.
Check the warning icons
In the Network tab, a yellow warning on a cookie shows why the browser blocked it, such as a SameSite or Secure problem.
| What you see | Likely cause |
|---|---|
| Cookie present on step 1, missing on step 2 | Host or domain changed, or cookie Path too narrow |
| New cookie value on every page | Cache stripping Set-Cookie, or server not reading the cookie |
| Cookie flagged as blocked in Network tab | SameSite or Secure flag mismatch |
| Works on desktop, fails in an in-app browser | Third-party cookie limits or an iframe |
| Fails only after a redirect | Redirect goes to a different host or protocol |
The page does not show an error, but the data from step 1 is missing.
How to fix it
Fix the cause you found. The settings below cover the most common ones. Menu names vary by theme and plugin version.
Make the site address consistent
In Settings > General, make WordPress Address and Site Address use the same host (www or non-www) and https. Redirect the other version to it.
Exclude session pages from cache
In your caching plugin or host cache, exclude the cart, checkout, account and multi-step form URLs, and exclude cookies such as woocommerce_cart_hash and wordpress_logged_in_.
Check for plugins that start sessions
Deactivate plugins one by one on a staging copy to find one that resets or blocks the session cookie.
Keep one primary domain
In Settings > Domains, set a primary domain and redirect the others to it so cart cookies stay on one host.
Link to the cart on the same domain
Check buttons, headless links or landing pages hosted elsewhere. They must send visitors to the store's own domain, not a different one.
Review apps that redirect
Disable upsell, currency or geolocation apps temporarily to see if one of them redirects or resets the cart.
Check tags that set cookies
In Preview mode, look for custom HTML tags that write or delete cookies and could overwrite the session cookie by name.
Set the cookie domain on analytics tags
In Google tag settings, make sure the cookie domain is auto or your root domain so IDs persist across subdomains.
Set the default domain
In Project settings > Hosting, choose the default domain (www or root) so the other redirects to it.
Check embedded forms and carts
If a form or checkout is embedded from another service, confirm it runs on a domain where it can set its own cookie and passes data in the URL or a hidden field.
Use your custom domain on every step
Attach the same custom domain to the funnel and its steps in Settings > Domains so steps do not switch hosts.
Avoid mixing embeds and links
If you embed a form in an iframe on another site, test it: browsers may block its cookies. Link to the funnel page instead where you can.
Set the primary domain
In Domains, set one primary domain so the site does not alternate between hosts.
Keep checkout on the site domain
Test the cart and checkout in a private window and avoid sending visitors through external pages before checkout.
Set the primary domain
In Settings > Domains, set the primary domain so other versions redirect to it.
Use SSL for all pages
In Settings > Advanced > SSL, keep SSL on so Secure cookies are not blocked on http pages.
Set the cookie with the right attributes
Use a root domain only if steps span subdomains. Use Secure on https, HttpOnly for session IDs and SameSite=Lax unless the flow is cross-site.
Keep Set-Cookie out of shared cache
Send Cache-Control: private on pages that depend on the session, and do not cache responses that set cookies.
Redirect to one host
Send all traffic to a single canonical host and protocol with a 301 redirect.
Set-Cookie: session_id=abc123; Path=/; Domain=example.com; Secure; HttpOnly; SameSite=LaxDifferent host
Leads or data lost
The browser does not send the cookie to the new host. The cart is empty and the visitor leaves.
Toggle the host to see how one redirect can drop the session.
How to confirm it's fixed
- In a private window, the session cookie has the same value on every step of the journey.
- The cart or form data from step 1 is still there on the last step.
- No cookie shows a warning icon in the Network tab.
- Test again on a phone with mobile data, and in Safari and Firefox.
- Test starting from the non-www and www versions, and from an ad link with UTM parameters.
- A test purchase or test lead completes and appears in your analytics and CRM.
How to prevent it happening again
- Keep one canonical domain and redirect all others to it.
- Re-test the full journey after every plugin, theme, cache, CDN or domain change.
- Keep cart, checkout and form step URLs on the cache exclusion list.
- Document which cookies your funnel needs and who sets them.
- Test in more than one browser, since cookie rules differ.
- Run the journey on a schedule so a break is found within a day, not a month.
How FunnelGuard handles this
FunnelGuard detects this issue only partly. It runs your real customer journey with a robot visitor on a schedule, and if the session is lost the journey fails: for example the cart is empty at checkout, or the form on step 2 cannot continue. A failure is re-checked from a second region, then you get one alert with a screenshot and a likely cause.
What it does not do: it does not inspect each cookie's attributes or tell you for certain that the session cookie is the cause. It only sees that the journey failed. It also covers only the journeys you set up, and it uses its own browser, so it will not show problems that appear only in certain visitor browsers, in-app browsers or with their privacy settings.
To cover the rest by hand, use the dev tools steps above after an alert, and test in Safari, Firefox and a phone browser from time to time. FunnelGuard's Free plan covers 1 site and 2 journeys with daily checks and no card, and paid plans have a 3-day free trial.
Questions people ask
Why is my cart empty when I go to checkout?
The browser is probably not sending the cart's session cookie to the checkout page. This happens when checkout is on a different host (www vs non-www, or another domain), when a cache removes the cookie, or when a SameSite or Secure flag blocks it. Compare the cookie in dev tools before and after the step.
Why does my session cookie change on every page?
The server is creating a new session each time because it does not receive the old cookie. Common reasons are a cache layer stripping Set-Cookie, a cookie set on a different domain or path, or a Secure cookie set over http. Check the Cookie request header on the second page.
How do I keep a cookie between www and non-www?
Best fix: redirect one version to the other so visitors stay on one host. If you need both, set the cookie's Domain attribute to the root domain, such as example.com, so subdomains can read it.
Does SameSite cause a lost session cookie?
Yes, it can. SameSite=Strict or Lax can stop the cookie being sent in cross-site requests, such as a checkout in an iframe or a return from an external payment page. SameSite=None with Secure allows cross-site use but may still be limited by browser privacy settings.
How do I see which cookie is being lost?
Open dev tools, go to Application (or Storage in Firefox) and view Cookies, then move through the funnel and see which one disappears or changes. In the Network tab, compare Set-Cookie in the response and Cookie in the next request.
Can caching cause a session cookie to be lost?
Yes. If a page cache or CDN serves a stored copy of a cart, checkout or form step, it can skip the server and the Set-Cookie header. Exclude those URLs and session cookies from the cache.
Can FunnelGuard detect a lost session cookie?
Only partly. It runs your journey on a schedule and alerts you when it fails, for example when the cart empties at checkout, but it does not read cookie attributes or confirm the cookie as the cause. You still need dev tools to find the exact reason.
Related issues
- CNV-377Cookie too large, server 400 errorFix guide
- CNV-378SameSite settings break iframe login/checkoutFix guide
- CNV-379localStorage required, fails in private modeFix guide
- CNV-380CSRF token expired, form rejects submitFix guide
- CNV-381Cached page serves stale CSRF/nonce (WordPress cache)Fix guide
- CNV-382Logged-in cache served to visitorsFix guide