umami
umami copied to clipboard
Page Visit time not correct
Expected that using navigator beacon API will fix the page visit time. When visiting a page and navigating to some other tab is not triggering the collect API endpoint for tracking time. It tracks time only after a page refresh which is not right as it adds a page view count unnecessarily.
How is the page visit time actually calculated? Was expecting the feature to be something like this.
As I understand it, only event tracking has been migrated to use the beacon api so far while page views still use xhr. This is currently being tracked in #570.
That's right, next release will tackle page visit time. It's tricky because I need to decide whether to make a database schema change or find another way around it.
Is there any plan to prioritize this? As for proper analytics, the page visit time is pretty important.
Maybe it is possible to use the library I mentioned in the first comment.
I've explored tracking the visit time to see if I could contribute on this. And it isn't particularly difficult to determine the duration on the client-side. But, similar to what @mikecao had mentioned, the database is where I hit a wall. I couldn't figure out how to non-destructively update the database schema and additionally keep the multiple database support.
I have a similar use case: users come to our site -> go to stream page -> sit on page for x minutes/hours -> exit
This makes our realtime stats, current stats, and session times all off
Would tracking an event with javascript on an interval (say, 3 minutes) keep this data up-to-date? Or would that possibly work for the realtime and current stats, but not session time?
I feel like this is a very important metric for a lot of users, and in its current form fundamentally flawed:
- with times only tracked between hits, last page visit duration and single-page visitors are not tracked at all
- visit times are polluted by inactive time
are there any plans for working on this? I feel like it deserves a lot more attention, since the current metric is not accurate at all.
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.