I want to be able to track how long a user spends on a screen in my mobile app.
I checked how the javascript script works on the browser and i noticed 2 request are sent. 1st event is a ‘pageview’ type, which is sent as soon as the user visits the page. The 2nd event is of type ‘append’, which adds the duration of the time spent on the page, by providing an id, that is also provided on the 1st event.
I tried doing the same via the HTTP API but it seems like it doesn’t support ‘append’. I think it falls back to type ‘event’ because it complains I did not pass a value for ‘event’.
I understand that I ‘might’ be able to track the duration if i provide it via the ‘pageview’ (can’t test this because of this bug). However I prefer the 2 http request approach because the user might see the screen and then the mobile app might stop without a callback (so no events will be sent).
What would you like to have?
I want to track time spent on a page via the HTTP API like the browser.
What is your use-case?
Keep track of time spent in my mobile app/pages.
How does it help other customers?
Nice stats about time spent on mobile apps using SA.