Mixpanel Community Icon

Understanding the App Session Metric: Calculation and Function

·
·

In an app (not a website), how does the "App session" metric work? How is it calculated?

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

    Hi Mattias N., 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, I can explain how the "App session" metric works in a mobile app context for Mixpanel. The "App session" event is part of Mixpanel's legacy automatically tracked events for mobile apps. However, it's important to note that Mixpanel doesn't recommend enabling these automatic events as they can be unreliable due to their reliance on client-side state.According to the Mixpanel SDKs: iOS (Swift) documentation, the "App session" event (raw name: ae_session_length) is tracked to reflect the number of seconds the user spent in the session. 3. Additionally, two user properties are tracked: - Total App Sessions (ae_total_app_session_length)It's worth noting that Mixpanel recommends disabling these automatically tracked events. If you're implementing Mixpanel in a new app, you should set trackAutomaticEvents to false during initialization to ensure these events are not tracked automatically.Instead of relying on these automatic events, Mixpanel offers more robust and configurable session tracking options. For instance, you can use timeout-based sessions, event-based sessions, or property-based sessions, which can be configured in the project settings. These methods provide more control and reliability in tracking user sessions in your app.

    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.

  • Avatar of Mattias N.
    Mattias N.
    ·
    ·

    kapa.ai, in an mobile app, how does the "Total App sessions" work in breakdown? I.e. when does it change from session 1 to 2, from 2 to 3 etc.

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

    Let me check the knowledge base for you again. One moment! đź“š

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

    Based on the knowledge sources provided, I don't have specific information about how "Total App sessions" works in breakdowns for mobile apps. The documents don't contain detailed information about the incrementation of session counts from 1 to 2, 2 to 3, and so on.However, I can provide some related information about sessions in Mixpanel that might be helpful: 1. Mixpanel offers different ways to compute sessions, which can be configured in the project settings. These include timeout-based sessions, event-based sessions, and property-based sessions. The way sessions are counted could depend on which method you're using.2. For timeout-based sessions (which is the default method), a new session starts when a user performs an event after a period of inactivity. The default timeout is 30 minutes, but this can be customized. So, theoretically, the session count could increment each time a new session starts after a timeout.3. For event-based sessions, the count might increment each time the defined "Session Start" event occurs.4. For property-based sessions, the count might increment each time the value of the defined "Session ID" property changes.5. It's important to note that sessions are reset every 24 hours at midnight according to your project timezone, so the maximum session length is 24 hours.If you need specific information about how "Total App sessions" increments in breakdowns for mobile apps, you might want to consult Mixpanel's documentation directly or contact their support team. The knowledge sources provided don't contain this level of detail about the "Total App sessions" metric in breakdowns.Mixpanel Sessions Documentation

    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.