I am developing a website, where I need to track number of views for a particular content (lets say articles).
Its very similar to stackoverflow's views for a question.
I don't know how stackoverflow does it. Basically it should
- Increment the view when a user other than the article author visits the article. If he keeps hitting refresh button, it should not increment the view.
- Not increment the view if a visitor hits the refresh button continuously.But it should increment for the first visit.
I have a field in the database to hold number of views.
Anybody know how stackoverflow does it? Is there any plugin in rails which I can use? I guess I should use sessions and IP address to keep track... Should I make use of Logs? OR Google Analytics?
help...