{"repo":"westonganger/rails_local_analytics","free":true,"listed":false,"github":"https://github.com/westonganger/rails_local_analytics","clone":"git clone https://github.com/westonganger/rails_local_analytics.git","description":"A Rails analytics gem. Simple, performant, local analytics for Rails. Solves 95% of your needs until your ready to start taking analytics more seriously using another tool.","language":"Ruby","stars":68,"topics":["analytics","rails","ruby","ruby-on-rails","site-analytics"],"license":"MIT","category":"analytics","readme_excerpt":"Rails Local Analytics Simple, performant, local analytics for Rails. Solves 95% of your needs until your ready to start taking analytics more seriously using another tool. Out of the box the following request details are tracked: - day - total (count per day) - url hostname (site) - url path (page) - referrer hostname - referrer path - platform (ios, android, linux, osx, windows, etc) - browser engine (blink, gecko, webkit, or nil) It is fully customizable to store more details if desired. Screenshots Installation Add the following migration to your app: The reason we store our analytics in two separate tables to keep the cardinality of our data low. You are permitted to store everything in only one table but I recommend you try the 2 table approach first and see if it meets your needs. See the performance optimization section for more details. Add the route for the analytics dashboard at the desired endpoint: Its generally recomended to use a background job (especially since we now have solid queue ). If you would like to disable background jobs you can use the following config option: The next step is to collect traffic. Recording requests There are two types of analytics that we mainly target: - Site level analytics Stored in the table tracked requests by day site - Page level analytics Stored in the table tracked requests by day page Your controllers have to manually call RailsLocalAnalytics.record request . For example: If you need to add more data to your events you can","default_branch":null,"files":null,"tree":[],"storefront":"/r/westonganger","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/westonganger/rails_local_analytics/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}