c# - ASP.NET MVC - Detect Time Spent on Page -


Does anyone know a way to capture and save on ASP.NET MVC's time spent on one page?

Edit To clarify some points:

  1. Basically the system is related to product placement. However, to take this forward, how long would I want to be a customer on a particular product page
  2. I would like to save and store data locally so that I can track and analyze it with others Can i present Data was captured not - where I would be also possible, avoid external services.
  3. My main concern is with trapping an event at the page load and on exit - it is clearly difficult because I am ASP.NET MVC Vanilla as ASP.NET and B / rich / Fancy An event can not be in the form of a pipeline and b) It is possible that a user will close the browser / navigate to a different site, which will make a bit confusing in this case.

Thank you in advance, JP

This is done

1)

Read your iis log, see the time between requesting a single html and two.html from the same user

2)

> Javascript counter and onload function which sends an AJAX call to some service that logs time


Comments