Mixpanel Community Icon

Understanding Insert ID in Mixpanel: Purpose & Tracking Requirements

·
·

what is the insert id in Mixpanel and what is the purpose and is this just a client side specific requirement or it is needed for server side tracking also?

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

    Hi B, 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
    ·
    ·

    The Insert ID (insert_id: A unique identifier for the event, used to deduplicate events that are accidentally sent multiple times."2. Deduplication: Mixpanel uses the Insert ID along with other event properties to identify and remove duplicate events. According to the Ingestion API documentation: "Events with identical values for (event, time, distinct_id, insert_id is required on all events. This makes it safe to retry /import requests."4. Format: The Insert ID must be 36 characters or less and contain only alphanumeric characters or hyphens. It's often recommended to use a UUID for this purpose.5. Generation: If you're using Mixpanel's SDKs, they will automatically generate an Insert ID for you. However, if you're implementing server-side tracking or using the API directly, you'll need to generate and provide the Insert ID yourself.6. Best Practice: If your events don't already have a unique ID, Mixpanel recommends "computing a hash of some set of properties that make the event semantically unique (eg: distinct_id + timestamp + some other property) and using the first 36 characters of that hash as the $insert_id."In summary, the Insert ID is a crucial component for both client-side and server-side event tracking in Mixpanel, serving to ensure data integrity by preventing duplicate events.

    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.