Mixpanel Community Icon

should you identify a user every time you want to track an event?

·
·

should you identify a user every time you want to track an event?

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

    Hi Max G., 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
    ·
    ·

    No, you should not identify a user every time you want to track an event. According to Mixpanel's best practices, you should only call .identify() at specific points in the user journey:1. Upon registration or login 2. When an app is re-opened in a logged-in stateIdentifying Users (Simplified) states:"By calling .identify() at these specific points in user journeys, you would be able to link the pre and post-login events to the same user on Mixpanel. Besides, calling .identify when the users re-open the app in a logged-in state ensures that all events in the session are tracked with the user's identifier such as user id."Once you've called .identify(), Mixpanel will automatically associate subsequent events with that user until you call .reset() (typically at logout) or .identify() with a different user ID.It's important to note that you should avoid calling .identify() for anonymous visitors to your site, as mentioned in multiple SDK documentation pages, such as React Native and JavaScript.By following these best practices, you ensure that events are correctly attributed to users without unnecessary calls to .identify() for every tracked event.

    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.