Reputation: 464
Is there a library or solution for quick apache/nginx log parsing and finding out how much time a user has spent on each page?
UPDATE: spent on every 3rd level domain.
For example AWStat can do that ( A full log analysis enables AWStats to show you the following information: Visits duration and last visits)
Upvotes: 3
Views: 7794
Reputation: 1524
Apache cannot do this. You can use jquery but it might not be accurate unless you perform long-polling on the page. Your question has been answered here in full on StackOverflow:
How to measure a time spent on a page?
Upvotes: 1
Reputation: 114407
Google analytics can help. It cannot determine how long a user was on the "last" page because it keeps track of when the user entered the next page to determine when they left the previous page.
Upvotes: 2
Reputation: 30170
You cannot do this with log files... The log files don't log when a user leaves the page. Youll need to use javascript for this using onload()
and onunload()
Upvotes: 2