views:

107

answers:

3

Hi Happy Holidays. I am not sure what is the best way to deal with this. I want to display page views and user views (How many unique users viewed a page).

Is there a plugin for this?

login_count is of course easy to check though. Just not sure about views. Google Analytics does the job well but I don't know whether it's to good to go through analytics integration.

Any help? Thanks. Happy Holidays!

+1  A: 

there is a plugin called railstat i used it and it works. you may need to update it to the latest and greatest rails however. even if you look at their code you'll see some good examples of how to do it.

pjammer
A: 

Thanks, I also saw garb plugin. Now choosing between the two. One thought: for google analytics - calling page views doesn't have to hit database but I may not get update reports. But I'm much concerned with having updated counts so I'd go with railstat. Thanks!

kgpdeveloper
Hey - welcome to StackOverflow! Thanks for having checked back and read your answer :) A couple notes - this is the sort of thing that would best go in a comment (see "add comment" below pjammer's answer), and we always very much appreciate it when, once you find an answer you like, to click the check mark next to it to ensure that the answerer gets credit for it. Thanks, and enjoy the ride!
Matchu
Ok.. Thanks.. I will next time.
kgpdeveloper
A: 

Anyone knows a plugin like that but for rails 3?

Lucas Renan
Hi this might work for you http://github.com/robmckinnon/rugalytics . I haven't tested with Rails 3 but I use the gem with Sinatra. I think it will work.
kgpdeveloper