The $device: prefix you're seeing is part of Mixpanel's identity management system, specifically in the Simplified ID Merge approach. Let me explain what this means:
In Mixpanel's Simplified ID Merge system, there are two main types of IDs:
1. $user_id - Used for identified users (when they're logged in)
2. $device_id - Used for anonymous users (before they log in)
When Mixpanel stores these IDs in an identity cluster, any ID provided as a $device_id is prefixed with $device: in the ID cluster. This helps Mixpanel distinguish between anonymous device IDs and authenticated user IDs within the system.
What you're looking at appears to be an identity cluster for a user with the main ID "9af811f2-8e15-4f8a-90c0-2bf670d3ddb9" (without prefix), and multiple device IDs that have been associated with this user over time (all with the $device: prefix).
This structure allows Mixpanel to track a user across:
- Multiple devices
- Before and after login
- Across multiple sessions
When a user is in an anonymous state, their distinct_id will be set to $device:[device-id]. Once they log in and you call .identify(), Mixpanel will merge the anonymous activity with the authenticated user profile.
Identifying Users (Simplified) explains that "Any ID provided as $device_id will be prefixed with $device: in the ID cluster."
This approach allows Mixpanel to retroactively merge an unlimited number of anonymous IDs to a single user, ensuring that all user activity is properly attributed regardless of when or where it occurred.