No commit activity in last 3 years
No release in over 3 years
Add Google Analytics urchin tracking module params to your URLs. It's the [Google Analytics URL builder](https://support.google.com/analytics/answer/1033867?hl=en) as a gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

Urchin Tracking Module

Add google analytics params to your URLs. It's the Google Analytics URL builder as a gem.

Installation

Add this line to your application's Gemfile:

gem 'urchin_tracking_module'

And then execute:

$ bundle

Or install it yourself as:

$ gem install urchin_tracking_module

Usage

require 'urchin_tracking_module'

UTM("http://example.com/#/welcome",
  utm_source: "newsletter_de",
  utm_medium: "email",
  utm_term:   "fashion+leather",
  utm_content: "Could be the subject line of your email",
  utm_campaign: "winter_2013" )
=> "http://example.com/?utm_source=newsletter_de&utm_medium=email&utm_term=fashion+leather&utm_content=Could+be+the+subject+line+of+your+email&utm_campaign=winter_2013#/welcome"

Contributing

Your thought's/improvements are welcome :)

  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

TODOs

  • remove bonusbox specific src param or make this kind of additions configurable.
  • UrchinTrackingModule.configure {|c| c[:utm_source] => 'my_app' } could have a configuration object instead of a hash, to become UrchinTrackingModule.configure {|c| c.utm_source = 'my_app' }

Code status

Build Status

License

This urchin_tracking_module project is released under the MIT License.