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

fix(tracker): send unload event on page hidden instead #139

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

ayuhito
Copy link
Member

@ayuhito ayuhito commented Sep 3, 2024

This removes all the extra logic used to calculate how long the user spent with the page hidden from view, and then calculating the full length spent subtracting time hidden. In theory, this seemed like a great idea, but in practice there were too many edge cases where the browser would send a ridiculously large time spent on page value that isn't representative of the user.

Now the tracker sends the unload event on the first time the page is hidden and considers that time spent on page. This should reduce the number of anomalies in data and not skew lesser visited pages as much.

@ayuhito ayuhito merged commit bd7d375 into main Sep 3, 2024
4 checks passed
@ayuhito ayuhito deleted the tracker/time-hidden branch September 3, 2024 19:37
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

Successfully merging this pull request may close these issues.

1 participant