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

calculate time on site #11

Open
mikestaub opened this issue Dec 12, 2020 · 2 comments
Open

calculate time on site #11

mikestaub opened this issue Dec 12, 2020 · 2 comments

Comments

@mikestaub
Copy link

Do the percentages treat each website view the same?

Meaning if I spend 2 hours on twitter but 10 seconds on cnn does it say 50% social and 50% news?

@seanmiller802
Copy link
Owner

Yes it does currently. I want to add this but I haven't done it yet bc it would increase the scope of the project by quite a bit I think since I would need to start a timer on each page visit and have some algo for figuring out if someone is actively interacting with the page or not. Would love suggestions on how to approach this though.

@mikestaub
Copy link
Author

I would use the visibilitychange event to log when the user starts and ends their session on a page and just log these events. You can also use focus and blur on the window to do this I believe.

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

No branches or pull requests

2 participants