Reputation: 3013
I was wondering what are the options for doing site analytics with a ruby on rails application ? I haven't seen any solutions specifically targeted towards rails - more towards apache type web servers. I don't want to use the google analytics, I'd like to have the logging/analyis all local. After a quick look at wiki's list of web analytics software http://en.wikipedia.org/wiki/List_of_web_analytics_software, I can't see anything that I can see how to incorporate into my rails/ruby app.
Upvotes: 3
Views: 2407
Reputation: 1823
AFAIK Rails deployments behind both Apache and nginx can both benefit from the host of tools developed for parsing web logs over the years. I loved AWStats :)
For application events not explicitly in the web logs - like logins, sign-ups, purchases - I'd recommend using keen-gem from Keen IO (Disclaimer - I work there). It's pretty easy - install or bundle the gem, then just add lines like this:
Keen.publish_async("sign_ups", { :username => "lloyd", :referred_by => "harry" })
anywhere in your Rails app to log events. Once the events have been logged you can use the workbench at keen.io to run queries and see visualizations, or you can use the REST API to pull any and all data back out for custom processing.
Upvotes: 1
Reputation: 3043
Most people deploy rails applications behind Apache or other web servers, because Rails applications can be set up to allow those web servers to quickly and efficiently serve static assets and cached pages. This also means that we can use the same log analysis tools we've always used like Analog, AWStats, etc.
Or we can just punt and use google analytics. I like row logs though :)
Hope that helps!
Upvotes: 0