How can we build a report to calculate how much average time user spent on site in a session with their distinct id's bifuraction?
Hi Mansi 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
To calculate the average time users spend on your site per session with a breakdown by distinct IDs, you can use Mixpanel's Sessions feature combined with Insights reporting. Here's how to build this report:
Using Session Duration Property
Mixpanel automatically computes sessions from your events and includes a "Session Duration (Seconds)" property with each Session Start/End event. This property indicates the amount of time spent during a session.1. In Insights, select the "Session End" event 2. Choose "Aggregate Property" as your measurement 3. Select the "Session Duration (Seconds)" property 4. Choose "Average" as your aggregation method 5. Break down by distinct_id to see the bifurcation by userThis will show you the average session duration for each distinct user ID in your project.
Alternative Approach Using Formulas
You can also calculate this using a formula in Insights: 1. Create a report that divides the sum of Session Duration by the number of sessions 2. Break down by distinct_id to see per-user averages
Converting to Minutes
If you prefer to see the results in minutes rather than seconds, you can apply a formula to divide the values by 60: LBKSA / 60LBKS
Where A is your average session duration in seconds.
Additional Tips
- To filter out bounces (very short sessions), you can add a filter for sessions longer than a specific duration (e.g., 10 seconds) - For more detailed analysis, you can break down by additional properties beyond distinct_idAccording to Mixpanel's documentation, "You can use any of our aggregations (sum, average, 90th percentile, etc.) to study the time spent by your users per session" Sessions: Compute sessions based on existing event data.For more information on finding average session duration, Mixpanel's FAQ states: "To find the average session duration across all users, you may refer to this report here: https://mixpanel.com/s/3rXLmT" Sessions FAQ.
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.