Mixpanel Community Icon

Can i update the distinctId of a user?

·
·

Can i update the distinctId of a user?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi George K., 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

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Based on the knowledge sources provided, it's not recommended to directly update or change the distinct_id of a user in Mixpanel. Instead, Mixpanel uses an identity management system that allows you to associate multiple identifiers with a single user. Here's a summary of how this works:1. Mixpanel uses a system called "ID Merge" to handle user identity. This system creates an identity cluster that can contain multiple IDs for a single user.2. When a user is initially anonymous, they are assigned a $device_id. When the user is identified (e.g., after login), you can call the .identify() method with a user ID.3. Calling .identify() adds the new user ID to the identity cluster, associating it with the existing $device_id.4. Mixpanel will then choose one of the IDs in the cluster (either the $device_id or the user ID) as the canonical distinct_id. This selection is done programmatically by Mixpanel and is not user-configurable.5. Any of the IDs in the cluster can be used for ingestion and will resolve to the same user in Mixpanel.It's important to note that you cannot directly change a user's distinct_id. As stated in the FAQ section:Identifying Users (Original) FAQ:"The canonical distinct_id is selected by Mixpanel using any of the IDs inside of a cluster. This means that even after identifying your user, Mixpanel may choose your user ID or one of the other IDs inside of the cluster (such as the device ID) to serve as the displayed ID for the user. This is random and not user-configurable."If you need to ensure that you can always query and see your own chosen user ID, it's recommended to set it as a separate user profile property and event property.

    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.