Thanks for your reply. I have a "like" system (you can only like, not dislike) as well but I also want to track views as another measure of popularity. It doesn't have to be super exact but would be great if it filtered out bots of course.
I just thought this was a quite common issue and wanted to know how other people solves it. The features I would like is: 1. Filter bots. 2. Count unique requests based on session hash, ip address or similar. Perhaps I need to build something custom to get this. Linus Den söndagen den 18:e augusti 2013 kl. 02:07:07 UTC+2 skrev Phil: > > > On Saturday, August 17, 2013 2:04:51 PM UTC-7, Linus Pettersson wrote: >> >> Hi >> >> Often when I build sites I need some way to track visits to specific >> pages. For instance I need to see what Artists are the most popular so I >> can let my users sort based on popularity. >> I have used the gem Impressionist before but recently I ran into major >> performance issues (see >> https://github.com/charlotte-ruby/impressionist/issues/94). >> >> I do use Google Analytics and _could_ pull that data somehow I guess, but >> isn't that data pretty "slow" (I want the views to update at least in a few >> minutes)? >> >> So, what do you use to track views in your apps? >> > > > FIrst I would say you need to crack the nut of what "popular" means. > Simple URL hits may not be your best metric for that. It could mean how > long a user dwells on a page, or how many scroll all the way to the bottom, > who's logged in vs. who's a casual users or an indexing bot, etc. > > Assuming "artists" is a table, you could add a simple counter column > (maybe with a related "counter_reset_at" column with a timestamp) and > increment it when the appropriate criteria is met. > > When I first made a popular T-shirt site (I'll refrain from saying the > name here) we used to have a 'Like' feature similar to Facebook. We found > users would systematically set up new accounts and like themselves and > dislike everybody else to try to falsify their ratings. We came up with > some simple ways to weed out the bad data. > > Hope this helps. > > > Phil > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9ab65baa-61b8-49e1-abb3-2c4fca28b1ef%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.