Mixpanel Community Icon

Difference Between $ae_session_length and $ae_total_app_session_length Explained

·
·

What's the different between $ae_session_length and $ae_total_app_session_length?

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

    Hi Daniel C., 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 information provided in the knowledge sources, I can explain the difference between $ae_session_length and $ae_total_app_session_length:1. $ae_session_length: This property is associated with the $ae_session event, which is an automatically tracked event in Mixpanel's mobile SDKs. It reflects the number of seconds a user spent in a single session Mixpanel SDKs: iOS (Swift).2. $ae_total_app_session_length: This is a user property that tracks the cumulative total length of all app sessions for a user Mixpanel SDKs: iOS (Swift).The key difference is that $ae_session_length represents the duration of a single session, while $ae_total_app_session_length represents the total duration of all sessions for a user.It's important to note that these properties are part of the legacy automatically tracked events feature in Mixpanel's mobile SDKs. The documentation recommends disabling this feature as these events rely on client-side state and can be unreliable.

    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 Daniel C.
    Daniel C.
    ·
    ·

    kapa.ai I want to find out how much time (seconds or minutes) a user spends in the app per day. How do I do that?

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

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

  • Avatar of Daniel C.
    Daniel C.
    ·
    ·

    I want the average kapa.ai

  • 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
    ·
    ·

    To find out how much time a user spends in your app per day, you can use Mixpanel's Sessions feature. Here's how you can approach this:1. First, ensure that you have Sessions set up in your Mixpanel project. By default, Mixpanel uses Timeout-Based Sessions, which automatically track user activity Sessions: Compute sessions based on existing event data.2. Once Sessions are set up, Mixpanel will generate "Session Start" and "Session End" events, along with a "Session Duration (Seconds)" property Session Properties.3. To analyze the time spent per day, you can use the Insights report in Mixpanel. Here's how: a. In the Insights report, select "Session End" as your event. b. Choose "Sum" as the aggregation method for the "Session Duration (Seconds)" property. c. Set your date range to the period you want to analyze. d. Group by "Day" to see the total time spent per day.4. If you prefer to see the results in minutes instead of seconds, you can use a formula to divide the sum by 60 Sessions: Compute sessions based on existing event data.Here's an example of how this might look in a Mixpanel query::LBKSLBKS```LBKSEvents( event_name:: "Session End", aggregator: "sum", event_property: "Session Duration (Seconds)" ) .group("time")```To get the average time per user per day, you could divide this by the number of unique users for each day.Remember that the maximum session length is 24 hours, as sessions are reset at midnight according to your project timezone Session Computation Deep-Dive.For more detailed analysis or specific use cases, you might want to check out the Use Cases section in the Mixpanel documentation on Sessions Use Cases.

    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 kapa.ai
    kapa.ai
    APP
    ·
    ·

    To calculate the average time a user spends in the app per day, we can modify the approach I mentioned earlier. Here's how you can do it using Mixpanel's Insights report:1. In the Insights report, select "Session End" as your event. 2. Choose "Average" instead of "Sum" for the "Session Duration (Seconds)" property. 3. Group by "Day" to see the average time spent per day.Here's an example of how this query might look::LBKSLBKS```LBKSEvents( event_name:: "Session End", aggregator: "avg", event_property: "Session Duration (Seconds)" ) .group("time")```This will give you the average session duration per day. If you want to convert it to minutes, you can use a formula to divide the result by 60 Sessions: Compute sessions based on existing event data.Remember that this average is per session, not per user. If you want the average time per user per day, you might need to use a more complex query or JQL (JavaScript Query Language) to first sum up all session durations for each user per day, then calculate the average across users.For more advanced calculations, you might find the JQL Builtins helpful, particularly the mixpanel.reducer.avg() function JQL Builtins.If you need further customization or have specific requirements for this calculation, please let me know and I can try to provide more detailed guidance.

    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.