Mixpanel Users Reset Across Subdomains

Share
Workaround available Web Updated November 13, 2026How we research

Quick answer

If localStorage persistence or a hosted subdomain blocks the shared cookie, distinct IDs differ per subdomain and users look duplicated.

Most likely fix: Use cookie persistence

How to fix it

Try these in order — the most common fix is first.

  1. 1. Use cookie persistence

    1. Remove persistence: 'localStorage' from init()
    2. Leave cross_subdomain_cookie at its default (true)
    Did this fix it?
  2. 2. Identify at the boundary

    1. Call identify() on both sites with the same $user_id
    2. Check cookie_expiration (default 365 days)
    Did this fix it?

Symptoms

Same visitor gets a new ID when moving between www and app subdomains.

Why it happens

  • persistence: 'localStorage' is not shared across subdomains
  • cross_subdomain_cookie set to false
  • Hosting that disallows cross-subdomain cookies

This guide also covers

  • mixpanel cross domain tracking
  • mixpanel subdomain tracking not working
  • mixpanel new distinct id

Still not working?

If Mixpanel keeps failing, you're not alone. See every Mixpanel problem users report or the alternatives people switch to.

Done fighting Mixpanel? Our small team builds your own Mixpanel alternative, or any software you need: web, mobile, games, desktop. Price agreed together.

Talk to us
Fixed it? Share this guide

Other Mixpanel errors

All 10 Mixpanel errors and fixes →