Search code examples
androidiosmixpanel

Is it possible to get total online hours of the users by using mixpanel in iOS and android


In mixpanel is it possible to track then total number of hours my application used per day. I am having Shift in and Shift out option in my application but what i need is to track the Consolidated time of my application usage per day.


Solution

  • In theory yes, but it very much depends on the events you have.

    If for example you have a beginSession and an endSession event tracked every time the users opens and closes the app, respectively, you can simply find all of a user's events of these kind and compute the "live time" between them.

    Mixpanel have a new(ish) application in their we console for running map-reduce style JQL queries on your data set, you could script something like this. Or if you prefer, you can plug into their export API and pull all your events for a users, and run the calculations. If you have lots of events you could even try to heuristically determine "active time" based on idle time between events?

    However, I believe you are more likely asking if this is something that Mixpanel tracks for you and will give you for free, I do not believe this is the case.

    If you have a rundown of your tracking structure, I may be able to provide more specific advise?