This is the context of a single-page application, but I believe it would happen as well in other cases. While the GA tracker get's updated with page changes I can see in the realtime report that the user is still alive. But when the user doesn't interact with the page for a while (while playing a video for example) it disconnects from the GA view.
I would like to better understand how GA works in this case, maybe I need send events to keep the user alive.
GA doesn't account for the time spent on the last page of a user's session—no matter how long they were there. This means that exit and bounce pages are excluded from the average session duration metric because by default, an exit page's time on page is always '0'.
Google Analytics can give you insight into where people are leaving your website, and you can then do a bit of detective work to try and work out why that might be. Here's three metrics to look at.
Google Analytics acquires user data from each website visitor through the use of page tags. A JavaScript page tag is inserted into the code of each page. This tag runs in the web browser of each visitor, collecting data and sending it to one of Google's data collection servers.
The bounce rate is the percentage of visitors who leave your landing page without venturing further into your site.
Google Analytics does not detect when somebody leaves the page. There is no reliable way to do that (unload handlers do not fire when somebody just closes the window). Instead Google waits till the session has ended - after 30 minutes without interaction (can be adjusted in Universal Analytics in the property settings) the session is ended and the vsitor has left as far as the reports are concerned (he might have left a lot earlier, but the time after the last interaction is not tracked in GA).
Plus a session can have 500 interactions at maximum, so there is no way to keep it alive indefinitely.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With