{"id":14955966,"url":"https://github.com/mshahzadtariq/devise-activity","last_synced_at":"2025-10-08T18:04:22.341Z","repository":{"id":56844188,"uuid":"177143816","full_name":"mshahzadtariq/devise-activity","owner":"mshahzadtariq","description":"Track signed-in user sessions and site navigation in an easy to traverse format","archived":false,"fork":false,"pushed_at":"2019-04-10T16:14:52.000Z","size":33,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T11:55:45.026Z","etag":null,"topics":["devise","devise-activity","gem","rails5","ruby","ruby-gem","ruby-on-rails","stats","tracking"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mshahzadtariq.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-22T13:20:34.000Z","updated_at":"2020-01-04T23:27:12.000Z","dependencies_parsed_at":"2022-08-26T10:50:14.429Z","dependency_job_id":null,"html_url":"https://github.com/mshahzadtariq/devise-activity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshahzadtariq%2Fdevise-activity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshahzadtariq%2Fdevise-activity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshahzadtariq%2Fdevise-activity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshahzadtariq%2Fdevise-activity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mshahzadtariq","download_url":"https://codeload.github.com/mshahzadtariq/devise-activity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235515426,"owners_count":19002481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devise","devise-activity","gem","rails5","ruby","ruby-gem","ruby-on-rails","stats","tracking"],"created_at":"2024-09-24T13:12:05.922Z","updated_at":"2025-10-06T09:31:11.842Z","avatar_url":"https://github.com/mshahzadtariq.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= DeviseActivity\n\nKeep history of user page views and time spent on different pages in rails. This gem depends on devise gem and uses devise 'current_user' helper method which can be configured.\n\n== Installation\n\nSimply add trackstamps gem to your Gemfile.\n\n    gem 'devise-activity'\n\nInstall bundler gems\n\n    bundle install\n\nInstall trackstamps\n\n    rails generate devise_activity:install\n\nYou can change sessions and navigations table names from generated configuration file (config/initializers/devise_activity.rb) before generating migration.\nGenerate migration on required model's table\n\n    rails generate devise_activity:migration\n\nInclude DeviseActivity module to application controller or admin etc for which you want to track user activities\n\n    class ApplicationController\n        include DeviseActivity\n\n        .....\n\n    end\n\nExecute migrations\n\n    rake db:migrate\n\nAnd now you are ready to track changes\n\n\n== Usage\n\nIt will automatically keep of sign in's, sign out's and page views history in sessions and navigations table i.e.\n\n    DeviseActivity::Session.all\n\nwill return last account was created by which user. Similarily\n\n    DeviseActivity::Session.last.navigations\n\n    DeviseActivity::Session.where(user_id: 12).all\n\n    DeviseActivity::Session.where(user_id: 12).last.navigations\n\n    DeviseActivity::Navigation.count\n\n    DeviseActivity::Navigation.last.action\n\n    DeviseActivity::Navigation.last.controller\n\nDeviseActivity also provide few handy model methods for Statistics\n\n    DeviseActivity::Stats.most_visits_by\n\n    DeviseActivity::Stats.least_visits_by\n\n    DeviseActivity::Stats.most_popular_controller\n\n    DeviseActivity::Stats.least_popular_controller\n\n    DeviseActivity::Stats.most_popular_action\n\n    DeviseActivity::Stats.least_popular_action\n\n    DeviseActivity::Stats.most_visited_page\n\n    DeviseActivity::Stats.least_visited_page\n\n    DeviseActivity::Stats.most_sign_ins_by\n\n    DeviseActivity::Stats.total_sign_ins(user)\n\n\n== TODO\n\n* Mongoid ORM support\n\n== Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmshahzadtariq%2Fdevise-activity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmshahzadtariq%2Fdevise-activity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmshahzadtariq%2Fdevise-activity/lists"}