LMo
LMo

Reputation: 1429

How to get a count of page views and display it on Rails App?

I have a Rails App that has articles and collections.

Rails App 3.2.14 Ruby 1.9.3

One a user is signed, he/she can create collections and put articles inside of it. The user can then email this article out a client. The client can click on a link and visit the collection ( essentially show the collection, but not edit it in anyway ).

How would I go about tracking how many total views and unique views a collection receives?

Upvotes: 0

Views: 1023

Answers (2)

Magnuss
Magnuss

Reputation: 2310

Check out gems like this one: impressionist

Upvotes: 1

glorieux
glorieux

Reputation: 119

I increment an integer entry on the database every time a user access the articles. This can be done through the controller method that is called to display your articles.

Upvotes: 1

Related Questions