Ticket #2041 (new New feature)
Support Ping requests to report a better 'time on page'
| Reported by: | matt | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.x - Piwik 1.x |
| Component: | Core | Keywords: | |
| Cc: | Sensitive: | no |
Description
Currently, the last page view is set with a 'time on page' of zero seconds.
Instead, we could regularly ping the Piwik server with a request that notifies Piwik that the user is still on the website.
This request should not record new page view, only increase the visit_total_time counter.
Also, we should only throw this request when the user is actually looking at the page, not doing something else in some other tabs.
The risk with this feature is that instead of improving the report accuracy, we end up inflating numbers: a lot of users leave pages open in other tabs for hours and don't do anything about it. We should heavily test to ensure we never throw a request on a page where the user didn't interact with recently. Some interactions we can maybe detect: mouse click, mouse move, etc.
Of course, we should not make everything slow by adding handlers on mouse move, etc.
