how we can built a report to calculate how many time user spent on the page in a session?
Hi Sonia, 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 how much time users spend on a page in a session using Mixpanel, you can leverage Mixpanel's session tracking capabilities and the session duration property. Here's how you can build such a report:
Using Session Duration Property
Mixpanel automatically computes sessions from the events you send and associates a "Session Duration (Seconds)" property with each session. You can use this property to analyze time spent: 1. In Insights, you can use the "Session Start" and "Session End" events to explore metrics like average session length per user or session duration across all users.2. The "Session Duration (Seconds)" property can be used to break down or filter your results to understand how long users spend on your site per session.Mixpanel Documentation provides an example of this analysis on their documentation site.
Creating a Session Duration Report
To build a specific report showing time spent on pages: 1. Use Insights to create a report with "Session Start" events
2. Apply the "Session Duration (Seconds)" property as your metric
3. You can use aggregations (sum, average, 90th percentile) to study time spent by users per session
4. To convert from seconds to minutes, use a formula to divide by 60For a more detailed view, you can break down by the Session Duration property to see the distribution of session lengths: LBKSThis will show you a distribution - for example, what percentage of users spend less than a minute on the site versus those who spend more than 5 minutes.LBKS
Alternative Method Using Funnels
As mentioned in the Mixpanel Community post, you can also use the Time to Convert chart in Funnels to track average session length: 1. Create a funnel with relevant events 2. Use the Time to Convert interval size, setting it to capture your desired session activity timeframe (e.g., 30 seconds minimum to 30 minutes maximum)
For Page-Specific Analysis
If you're tracking page views (which you can do automatically with Mixpanel's Javascript SDK), you can: 1. Break down Session Start events by the Current URL property to see which pages users spend time on 2. Filter for specific pages to analyze time spent on particular pagesRemember that for accurate page-specific time tracking, you'll need to ensure you're properly tracking page view events in your implementation.
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.