Mixpanel Users Reset Across Subdomains
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. Use cookie persistence
- Remove persistence: 'localStorage' from init()
- Leave cross_subdomain_cookie at its default (true)
Did this fix it?2. Identify at the boundary
- Call identify() on both sites with the same $user_id
- 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 usOther Mixpanel errors
- Mixpanel Events Not Showing
- Mixpanel Not Tracking: Blocked by Ad Blocker
- Mixpanel Identify Not Merging Users
- Mixpanel Data Delay: Events Late in Reports
- Mixpanel Import Failed or Events Dropped
- Mixpanel Event Limit Exceeded and Overage Bill
- Mixpanel Session Replay Not Working
- Mixpanel /decide and /flags Requests Failing