why are there instances where a user login so we should know who this user is however only data point available is device ID which cannot be used to identify a unique user. What could be the reasons?
Hi event, 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
There are several reasons why, after a user logs in (so you should know who the user is), only the device ID is available in Mixpanel and not the user ID: 1. identify() Not Called After Login:
If your implementation does not call .identify(<user_id> )
immediately after the user logs in, Mixpanel will continue to associate events with the anonymous $device_id
rather than the known $user_id
. This is a common cause—Mixpanel requires an explicit .identify()
call to link the device to the user and start tracking events under the user’s ID. Without this, all events remain anonymous and tied only to the device ID, making it impossible to uniquely identify the user from those events alone Identifying Users (Simplified) – Client-side Identity Management.2. No Event Sent After identify():
In the Simplified ID Merge system, it’s necessary to send at least one event after calling .identify()
for the merge between $device_id
and $user_id
to occur. If no event is sent after identification, the mapping does not happen, and subsequent data may still only show the device ID Identifying Users (Simplified) – Client-side Identity Management.3. Incorrect Implementation of identify():
Sometimes, the .identify()
function is called incorrectly, such as passing a static string (e.g., 'user_id'
) instead of the actual user’s unique ID. This results in all users being tracked under the same ID or not being identified at all, so only the device ID is available Hot Shard Limits – Changing your implementation.4. Server-side Tracking Without Proper ID Management:
If you are sending events from the server and only include the $device_id
(or set only the distinct_id
to the device ID) without also including the $user_id
after login, Mixpanel cannot associate those events with a known user. The recommended approach is to include both $device_id
and $user_id
in your events after login so Mixpanel can merge them Identifying Users (Simplified) – Server-side Identity Management.5. Reset Not Called on Logout (Multiple Users on One Device):
If .reset()
is not called when a user logs out, the next user on the same device may continue to be tracked under the previous user’s device ID, leading to confusion and only device-level identification Identifying Users (Simplified) – Example User Flows.In summary, the most common reasons are missing or incorrect .identify()
calls, not sending an event after identification, or server-side events not including the correct user identifiers. Reviewing your implementation to ensure proper identity management at login and logout is key to resolving this issue.
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.