Screenshot of views integration

A simple module that tracks each time a user logs in and stores a historical
record in your database. This data is then exposed to views so you can report on
it if required.

  • Logs minimal data: user ID, and time logged in
  • Ability to exclude users from tracking by role
  • Hooks to allow fine grained control over which logins get tracked
  • Hooks to allow you to add information to the data stored
  • Views integration


Install, and activate the module as you would any other module. As soon as the
module is active, then logins will be recorded in your database.

If you wish to exclude certain roles from being tracked, then you can assign the
role the permission Excluded from login tracking and their logins will not be

Fine grained control over login tracking

If you need finer grained control over which logins are tracked, then you can
implement your required login in hook_login_tracker_track_login_alter() to
override whether a login is tracked for an individual instance.

Storage of additional data

You can store additional data along with the login tracking by implementing
hook_login_tracker_login_data. The default value is an empty array, so you may
add to that as required.

Views integration

You can access the data in the login tracker tables either as a base view, or
more usefully as a relationship against the user table.

Frequently asked questions

Does the module track all users?
By default the module will track logins for all users except user 1.

Other similar modules

Login History:
Logs more information that is necessarily required, and doesn't currently have views integration.

Login activity:
Logs more information that is necessarily required. Has additional dependencies which aren't necessary for simple statistical tracking. Doesn't currently have views integration.

Supporting organizations: 
Sponsored development
Supporting maintenance

Project Information