function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Login Hours

I am trying to capture how many hours did a user for for day on salesforce. Can anyone please help me generating a report in sucha  pattern.

Imran MohammedImran Mohammed

As far as i know, there is no way to track the login hours.


 The closest way I can think to get at this information would be to monitor the login history from Your Name > Setup > Administration Setup > Manage Users > Login History


It looks like the only way you can report of of it and filter is by filtering Usernames, which wouldn't do you any good.  It's dirty and horribly inefficient but I'm not aware of another way to monitor salesforce usage.  Unfortunately login history only does capture when a login is made, not when a session with the client is terminated.




Depending on what sort of tracking you want, you might just look at (Google Analytics). If that won't help you, you might consider using some sort of tracking JavaScript; this won't work for mobile and integration apps, but desktop users would be fairly-well timed.


I would use a JavaScript-only cookie to track the amount of time used, and periodically harvest this data and post it back to the server. It would be a sort of quick-and-dirty way of going about this. Sadly, though, it's not foolproof... No method out there today is foolproof. It has to do with the fact that doesn't log when sessions end.