Mixpanel Community Icon

are we able to define what distinct ID Mixpanel should use?

·
·

are we able to define what distinct ID Mixpanel should use?

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

    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

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

    In Mixpanel, the ability to define what distinct ID is used depends on your implementation method and which ID Merge API your project is using.

    Server-side tracking

    When using server-side libraries (like Go, Node.js), you need to generate and manage the distinct_id yourself: - For server-side tracking, Mixpanel doesn't automatically generate IDs like it does with client-side SDKs Mixpanel SDKs: Go - You'll need to generate and include the distinct_id in your events and profile data Mixpanel SDKs: Node.js

    Client-side tracking

    For client-side SDKs (Web, iOS, Android), the behavior depends on which ID Merge API your project uses:

    Simplified ID Merge API

    - You can influence the distinct_id by setting $device_id and $user_id properties - When only $device_id is present, it becomes the distinct_id - When $user_id is present, it becomes the distinct_id Identifying Users (Simplified)

    Original ID Merge API

    - The distinct_id is programmatically selected by Mixpanel from the identity cluster - This selection is random and not user-configurable - Any ID in the cluster can be used for ingestion, but only the canonical distinct_id can be used in queries Identifying Users (Original)

    Best practice

    If you need to ensure you can always query by your own chosen user ID, set it as a separate user profile property and event property, regardless of which ID becomes the distinct_id Identifying Users (Original).You can check which Identity Merge API your project is using in your project settings.

    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.