Answer the question
In order to leave comments, you need to log in
How to calculate the time on the site if it is one-page?
Colleagues, tell me how to calculate the time spent on the site, if it is a one-page site and there were no actions on it?
As far as I understand, both Google Analytics and Yandex.Metrica consider time on site to be 0 by default in this case.
Thank you!
Answer the question
In order to leave comments, you need to log in
Periodically send an AJAX request from the client to the server.
The metric sends pings every 15 seconds, so it will count for a one-pager without any problems.
In Yandex.Metrica in Webvisor, there is a time measurement on the site. On my one-page site, everything counts perfectly (column "Duration").
Yes, in my opinion, the asynchronous code in both stats already normally sends periodic requests for you))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question