Unique view count
I have a collection of links which are being displayed on the index page. Whenever a user clicks a link I want to keep a track of the number of unique views. I know it can be d开发者_开发知识库one by tracking the ips whenever a click happens by request.remote_ip
and then the link of the page that was clicked. Is there any better approach ? Any plugins etc.
google analytics :)
Usual approach would be to assign random UserID, store it in a cookie and write it in a log entry each time a user performs an action, either to a DB table or a log file. Later you easily get your unique counts either by SQL query, or by grep | sort | uniq | wc
-ing your logs.
I guess you may find a plugin for it, but not much manual work either.
精彩评论