-1

I think about the session mostly, I would like to be able to have the time spent by the user while he was using the app.

Do you know what are the best practices to say for example that the user "Joe" used the app three times last Wednesday and display the time spent for each of these times ?

DavidK
  • 2,495
  • 3
  • 23
  • 38

1 Answers1

-1

Usage of sessions would be highly recommended by me. Yes it would be better to display the duration of logged in session of each user.

George J Padayatti
  • 848
  • 1
  • 6
  • 19
  • How can I detect that the user is no more logged ? Can you provide an example of what you advise me to do ? Thanks – DavidK Apr 29 '16 at 20:08
  • Simple method would be to add logged in and logged out time column in database. When the user is logged out using session.pop() method, you could insert the time stamp(using datetime module in python) to logged out column in database. Then calculate the difference between logged in and logged out time which will give you the duration of user session. – George J Padayatti Apr 30 '16 at 04:36
  • The problem is that the users will have to log in but logging out is not done by all users. – DavidK Apr 30 '16 at 21:31