Hi,
I can see from your API documentation that you send Heartbeat ping events to determine how much time visitors spend on a page, where the frequency in seconds goes like this: 15, 30, 60, 120, 240, 480, 960, 1800.
The documentation also says that when a page loses focus these pings will be paused until the focus is restored.
However, I am still unclear on what exactly happens when the page is restored. From my tests using the Tracker debugger, I have the impression that when the page is restored Piwik PRO sends all those pings that would have been triggered if I had left the page active in quick succession? Does this mean that the time on page will include all the time my page was not in focus?
Can you please explain exactly how the time on page calculation is made, maybe using the simple example below?
- I go to the home page of the website and I stay there for 45 seconds.
- Then I open a new tab on my browser and go do something else for 10 minutes.
- After 10 minutes I select my homepage again and stay on the page for an additional 60 seconds.
- I open again another tab and stay there for several hours (long after the session times out).
What would be the total time that gets recorded for the homepage in this example?
Thank you!