Open d4rken opened 5 years ago
Thanks @d4rken. To justify this need more, I just wanted to point out our situation, which I think is a common case. In live-streaming applications like ours, users mostly will exit the app from the player page. Thus we have no duration for their last action, which in our case is watching a stream. Comparing to our web platform, we can see a notable difference in users' visit duration, which we believe is because of this very issue.
I guess we could introduce a function like Tracker.enableHeartBeat(timeInMiliseconds)
, not sure when one would best call this in an Android app like yours or when to disable it hm...
What about just using the fact that we know when the app has focus. If the app come to foreground a session starts and if the app goes to background a session ends. In between we can be sure the user is viewing a screen and thus the timer for this screen should run.
The enableHeartBeatTimer
would be also interesting for our application as we have many users just opening a single page before closing the app again. Is there any support for this functionality in IOS or Android yet?
https://developer.matomo.org/guides/tracking-javascript-guide#accurately-measure-the-time-spent-on-each-page
See #201