Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page Visit time not correct #1047

Closed
chatRG opened this issue Mar 21, 2022 · 10 comments
Closed

Page Visit time not correct #1047

chatRG opened this issue Mar 21, 2022 · 10 comments
Labels

Comments

@chatRG
Copy link

chatRG commented Mar 21, 2022

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.

@Sammy-T
Copy link
Contributor

Sammy-T commented Mar 21, 2022

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.

@mikecao
Copy link
Collaborator

mikecao commented Mar 22, 2022

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.

@chatRG
Copy link
Author

chatRG commented Apr 8, 2022

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.

@Sammy-T
Copy link
Contributor

Sammy-T commented Apr 8, 2022

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.

@joeyscarim
Copy link

joeyscarim commented Jul 21, 2022

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?

@changethe
Copy link

I feel like this is a very important metric for a lot of users, and in its current form fundamentally flawed:

  1. with times only tracked between hits, last page visit duration and single-page visitors are not tracked at all
  2. 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.

@github-actions
Copy link

This issue is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Aug 19, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2023
@danielunited
Copy link

Hi. Is the metric still flawed? The visit duration looks suspiciously low for me.

@LushawnDev
Copy link

Yep, experienced the same thing. I thought my website visit time was awful until I checked using another analytics software for a few weeks and saw a massive difference.

Also when looking at certain stats you can see a load with visit duration of 0s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants