should we be sending anonymous ID's with authenticated users?
Hi Bradley A., 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
When a user transitions from being anonymous to authenticated (e.g., after login or registration), you should send both the anonymous ID (as $device_id
) and the authenticated user ID (as $user_id
) together in the same event at least once. This allows Mixpanel to merge the anonymous and authenticated identities, ensuring that pre-login and post-login events are attributed to the same user. After this merge event, you can continue sending just the $user_id
 for subsequent authenticated events, but including both is not harmful.Here’s how it works in the Simplified ID Merge system: - Anonymous state: Send events with $device_id
 only.
- Upon authentication: Send an event with both $device_id
 and $user_id
 to trigger the merge.
- After merge: You may send events with just $user_id
, but including $device_id
 is also supported.Example merge event: LBKS{ "event": "Sign Up", "properties": { "token": "{{token}}", "$device_id": "anonymous111", "$user_id": "charlie" } }LBKS
This ensures all events from before and after login are linked to the same user profile Understanding Simplified ID Merge.Summary:
Yes, you should send the anonymous ID with authenticated users at the moment of authentication to enable identity merging. After that, it’s optional but supported to continue including it Identifying Users (Simplified).
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.