[ruby-on-rails] simple hit counter for page views in rails



Answers

Question

I've found several solutions for this problem, for example railstat from this post:

Page views in Rails

I have a bunch of articles and reviews which I would like a hit counter filtered by unique IPs. Exactly like does for this post. But I don't really care for such a solution as railstat when google analytics is already doing this for me and including a whole lot of code, keeping track of unique IPs, etc.. My present thinking is to use Garb or some other Analytics plugin to pull the pages stats if they are older than say 12 hours updating some table, but I also need a cache_column.

I'm assuming you can pull stats from Analytics for a particular page and that they update their stats every 12 hours?

I'm wondering if there are any reasons why this would be a bad idea, or if someone has a better solution?

Thanks




Links