0

All I can see is when they registered and when they last logged in. Can I get more detail - for example, how many times they have logged in, the time they spent on the site etc. Many thanks.

0

The only way I can see to do this would be to catch a successful login and process a tracking cookie or session to capture the time until they logout. You would have to do something that didn't clash with EE's variables, but something like:

$_SESSION['loginTime'] = new DateTime(date('y-m-d h:m:s'));

You would need to either write an addon or enable PHP though. Once they log out, you could capture the time and log the difference.

2
  • The catch is that most people (like me) never logout....... – Jim Wyse Feb 14 '16 at 2:09
  • Unfortunately, I don't know of a way to capture that. You might try doing something like window.onbeforeunload = function(e) { }; and trigger something the server can catch. – W3bGuy Feb 16 '16 at 22:46
0

To accomplish acquiring the metrics like your after, I wrote an extension and accessory for a client that writes, login-timestamp, sessionid & user_id to a table, I also do logout as well, but most people don't usually logout making it tough to actually measure time on site. The accessory is a dashboard for the data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.