The user_id as other properties are being overwritten every time there’s a new identify_call
Hi Juan C., 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 information provided in the knowledge sources, it appears that the behavior you're describing is not expected. The $user_id
and other profile properties should not be overwritten every time there's a new identify call. Let's clarify how this should work:1. Identifying Users:
When you call identify()
, you're associating subsequent events and profile updates with a specific user ID. This doesn't overwrite existing profile properties by itself.2. Setting Profile Properties:
After identifying a user, you can set profile properties using methods like people.set()
. These methods will update existing properties or add new ones if they don't exist.From the Mixpanel SDKs: Javascript Storing User Profiles> documentation:LBKS// You must call identify to associate the profile update with the user mixpanel.identify('12345'); mixpanel.people.set({ plan: 'Premium' });LBKS// We only need to call identify once per page load mixpanel.people.set({ plan: 'Enterprise', // Update "plan" from "Premium" to "Enterprise" company: 'mixpanel' // Create new "company" profile prop });LBKS
This example shows that you only need to call identify()
once, and subsequent people.set()
calls will update or add properties without overwriting everything.If you're experiencing behavior where properties are being overwritten unexpectedly, it could be due to one of these reasons:1. You might be calling people.set()
with a complete set of properties each time, which would overwrite all properties.
2. There might be an issue with how you're implementing the SDK in your code.To troubleshoot this issue, I recommend:1. Double-check your implementation to ensure you're not accidentally overwriting all properties in each call.
2. Use the Activity Feed to debug in real-time (it updates within a minute).
3. If the issue persists, you may want to contact Mixpanel support for further assistance, as this behavior is not standard according to the documentation.
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.
Let me check the knowledge base for you again. One moment! 📚
Based on the information provided in the knowledge sources, the behavior you're describing where all events in the activity feed are set to the last user that had an identify call is not the expected behavior for Mixpanel's identity management system. Let's clarify how it should work and what might be causing this issue:1. Identity Management:
Mixpanel uses an identity management system to link different identifiers (anonymous and known) to the same user. When implemented correctly, events from before and after a user logs in should be connected to the same user profile.2. ID Merge:
Mixpanel's ID Merge system is designed to stitch together user behavior across different sessions and devices. As stated in the Identifying Users (Original) documentation:"Under the hood, Mixpanel will stitch the event streams of those users together. This works even if a user has multiple anonymous sessions (eg: on desktop and mobile). As long as you always call .identify
when the user logs in, all of that activity will be stitched together."3. Possible Causes:
If all events are being attributed to the last identified user, it could indicate an issue with your implementation. Some potential causes include: a. Incorrect usage of .reset()
: If you're calling .reset()
unnecessarily, it might be creating new anonymous sessions that aren't being properly linked.
b. Improper implementation of .identify()
: Make sure you're calling .identify()
at the right times, such as when a user logs in or when the app is reopened in a logged-in state. c. ID Management version: Check which version of ID Management you're using (Original or Simplified), as the implementation details differ slightly.4. Troubleshooting:
To address this issue, you can: a. Review your implementation: Ensure you're following the best practices outlined in the Best Practices section of the documentation. b. Use the Activity Feed: As mentioned in the FAQ, "For debugging purposes, the Activity Feed view of a single user is updated in real-time (less than 1 minute delay)." Use this to verify if the events are being correctly attributed in real-time. c. Check ID Merge propagation: Keep in mind that "It may take up to 24 hours for this mapping to propagate to all other parts of the system."If after reviewing your implementation and waiting for the ID Merge to propagate, you're still seeing all events attributed to the last identified user, it's recommended to contact Mixpanel support. This behavior suggests there might be an issue with your specific implementation or possibly a bug in 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.