Hi guys, I have a question Our product has 4 main features in our app and we've set up different events for each feature. How should I go above calculating average session length spent in each feature? I'm only seeing a Session Start/End with property Session Duration associated. And if I use this, it calculates overall through the entire app encompassing all features. How do I use this for EACH feature? Thanks!
Check out this conversation to see if this helps you with your question. https://mixpanelcommunity.slack.com/archives/C02RUV27S3V/p1749755108781349?thread_ts=1749754822.434509&cid=C02RUV27S3V
Thank you so much for the reply! This is essentially calculating the time between two events hence I'd need a Session Start Event and Session End Event, right? But my question is, would this only get the time of those users who did exactly these two events? Because ideally, one session (for one feature) would be the start event of THAT feature for us. And anything they do in that feature would be included in the session duration.
So Session Start / End are virtual events calculated by Mixpanel based on your project's set "timeout" for session calculations. The approach of using the time_event will start a timer when someone does X (like click a button to go to Main Feature A). And then it stops the timer when you do another thing like clicking a button to go to Main Feature B or go home or whatever. So this is a timer for that specific event. It will attach the time duration in seconds to the event on which the time_event was initially called.
e.g., in our code we set this:
trackTime(eventName) {
mixpanel.time_event(`${underscore(eventName)}`);
}
and then we have that attached to different events that we setup to track. e.g.,
MPTracking.trackTime('import row confirmed');
MPTracking.trackTime('import row matched');
so when someone clicks to confirm a row, it runs the time_event. If they match a row, we run the time_event. etc.
I see, thank you for explaining! Really useful info, so this is on the development side of things. As in the devs would have to send this event from our backend to reflect on Mixpanel. Could there be something done on Mixpanel itself? Using the Funnels?
yes, definitely the development side of things. In my case, it was also UX side of things. Instead of a running list of rows that could be confirmed, matched, etc., I had to change to a "single record per view" approach so I could explicitly determine when to fire the 'start' on the timer, otherwise the timer was picking up when a row entered the view, along with 19 other rows, and that wasn't helpful.