If I have the mixpanel identify code on my website and my webapp, will mixpanel merge the identies of users that start on the website then move to the webapp?
Hi Daniel D., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Yes, Mixpanel will merge the identities of users who start on your website and then move to your webapp, as long as you're implementing ID Merge correctly. Here's how it works: When a user visits your website, Mixpanel assigns them a random $device_id
(anonymous ID). When they later sign up or log in on either platform, you should call .identify()
with the same user ID on both platforms. This creates an identity cluster that links their anonymous activity with their authenticated activity across devices.For example, if a user:
1. Browses your website anonymously (gets $device_id: D1
)
2. Signs up on your website (you call .identify("user123")
)
3. Later uses your webapp (gets a different $device_id: D2
)
4. Logs in on your webapp (you call .identify("user123")
again)Mixpanel will correctly attribute all this activity to the same user.The key requirements are:
- You must use the same user ID when calling .identify()
on both platforms
- You should call .reset()
when users log out to prevent unintentional merging of multiple users sharing one deviceThis functionality is available in all versions of Mixpanel's ID management, but works most seamlessly with the Simplified ID Merge system, which allows unlimited merging of anonymous IDs to a user ID Learn about Identifying Users.For best practices when tracking across platforms, ensure that:
- Events that represent the same action are named consistently across platforms
- You handle user identity properly with .identify()
and .reset()
- You're sending data from all platforms to the same Mixpanel project (unless you have a specific reason not to)Cross-Platform Tracking Best Practices
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.