The knowledge sources I have access to don't contain specific information about why you might see two mp_ cookies from the same domain in Mixpanel.
However, based on what the docs do mention, here are a couple of relevant configuration points that could be worth investigating:
- 1.
Subdomain cookie behavior: By default, the Mixpanel JavaScript SDK sets a cookie that works across subdomains. If your setup involves subdomains, it's possible that separate cookies are being created per subdomain. [Mixpanel Cookie]
- 2.
Multiple Mixpanel instances: If your page initializes Mixpanel more than once (e.g., with different project tokens or instance names), each instance would create its own mp_ cookie.
- 3.
localStorage vs. cookie persistence: The SDK supports different persistence modes (cookie vs. localStorage), and mismatched configurations could potentially lead to unexpected behavior. [Mixpanel Cookie]
For a definitive answer on duplicate mp_ cookies, I'd recommend:
Checking if mixpanel.init() is being called more than once on your page with different configurations or instance names.
Reaching out to Mixpanel Support directly, as this specific scenario isn't covered in the knowledge sources I have available.