What is the difference between Device ID and Distinct ID?
Hi Moritz H., 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
Based on the knowledge sources, here are the key differences between Device ID and Distinct ID in Mixpanel:
Device ID ($device_id)
Device ID is used to track a device while the user is in an anonymous state. According to the Simplified ID Merge documentation: - It's automatically generated by Mixpanel's client-side SDK and attached to all user events
- It serves as the anonymous ID for the user before they log in or sign up
- When an event contains only a $device_id (without a $user_id), the $device_id value is set as the distinct_id for that event
- It persists on the user's device until .identify() or .reset() is called
Distinct ID (distinct_id)
Distinct ID is Mixpanel's internal unique identifier used to track a user across the entire system. As explained in the Identity Management Overview: - It's the property Mixpanel uses to determine user uniqueness
- Every event and profile update should have a distinct_id associated with it
- When two events have the same distinct_id, they're considered performed by the same unique user
- It's used across all Mixpanel reports (Insights, Funnels, User profiles) to identify and track users
The Relationship
In the Simplified ID Merge API, the distinct_id is determined automatically based on the presence of $device_id and $user_id: - Before login: distinct_id = $device_id (prefixed with $device:)
- After login: distinct_id = $user_id
- When both $user_id and $device_id appear together for the first time, Mixpanel creates a mapping to merge them into an identity clusterIn summary: Device ID is one type of identifier (for anonymous users), while Distinct ID is the unified identifier that Mixpanel ultimately uses to track users throughout the system.
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.
