Plugins - HitTracker

StarAdd to favorites

HitTracker can easily give you the functionality you need to track page views, most emailed, most whatever.
Note: Not ideal for enterprise level sites.
1. Add this migration:
create_table :hits do |t|
t.column :hittable_type, :string
t.column :hittable_id, :integer
t.column :kind, :string
end
2. Add this to a model you want to track:
track_hits
3. In your controller, when you want to save a hit, do this:
hit(@object, ‘PageView’) # replace ‘PageView’ with a unique identifier for the type of hit.
the hit method works on collections too!
4. Access an objects hits:
@object.hits # returns a collection
@object.hit_count # returns an integer

josh stephenson

http://elctech.com/2007/9/5/hit-tracker-plugin

http://svn.elctech.com/svn/public/plugins/hit_tracker

Rails' (MIT)

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Searching and Queries

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?