Mixpanel Community Icon

Mixpanel Tracking Issue: User IDs Not Appearing in Analytics

·
·

i see a trend that mix panel is not tracking some of my users, for instance in my back end data base, I see a user register and user ID assigned to it. But when I look at mixpanel, I see that user ID missing.

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

    Hi Akif 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
    ·
    ·

    This issue you're experiencing with missing user IDs in Mixpanel compared to your backend database is a common problem, especially when using server-side tracking. Let me explain some possible reasons and solutions based on the information provided in the Mixpanel documentation.1. Server-Side ID Management: Mixpanel's server-side SDKs do not automatically generate IDs. As mentioned in the Server-Side Best Practices, your server is responsible for generating IDs and maintaining ID persistence. This means you need to ensure that you're correctly setting the distinct_id for each event you send to Mixpanel.2. Incorrect ID Implementation: Make sure you're implementing the ID management correctly. For server-side tracking, you should be setting either the distinct_id directly, or preferably, setting both $device_id and $user_id properties in your events. The Server-side Identity Management guide provides a step-by-step process for this.3. Debugging Discrepancies: To debug this issue, you can follow the steps outlined in the Debugging Discrepancies section. This includes: - Ensuring you're looking at the same time frame and timezone in both systems - Drilling down into specific days or segments to identify patterns - Comparing total event count vs. unique user count4. Checking Event Ingestion: You should also verify if the events for these missing users are being sent to Mixpanel at all. The Missing or Incomplete Events section provides guidance on how to debug this, including enabling debug mode and checking browser console logs for web applications.5. API Host Configuration: Ensure that you're using the correct API host based on your project's data residency. Using the wrong API host can result in events being rejected. Check the API host configuration in your SDK setup.To further investigate and resolve this issue, I recommend implementing logging in your server-side code to confirm that you're sending the correct user IDs to Mixpanel for each event. Also, use Mixpanel's debug mode or network monitoring tools to verify that the events are being sent and received correctly.If you've confirmed that you're sending the correct IDs and events, but they're still not appearing in Mixpanel, it would be advisable to contact Mixpanel's support team for more in-depth troubleshooting.

    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.