Project

re_track

0.0
No commit activity in last 3 years
No release in over 3 years
Track HTTP-Referrers in Rails using Mongoid/MongoDB
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

ReTrack

Build Status Coverage Status Code Climate Dependency Status

Track HTTP-Referrers in Rails using Mongoid.

Installation

Add this line to your application's Gemfile:

gem 're_track'

And then execute:

$ bundle

Or install it yourself as:

$ gem install re_track

Usage

ApplicationController
  # saves referer information to the session
  include ReTrack::Tracker
end

OtherController
  # put in the controllers which create the model you want to track
  include ReTrack::Sweeper
  re_track :user # there has to be a trackable @user instance variable
end

MyModel
  # include in every model that should get tracking information added
  include ReTrack::Trackable
end

When your OtherController creates MyModel in its create-action a ReTrack::RefererTracking is created as well, access it like this:

my_model.referer_tracking
ReTrack::RefererTracking.all.distinct(:first_url)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Credit

re_track is inspired (read: stolen) by referer_tracking. Thanks.

License

This project rocks and uses MIT-LICENSE.