public
Fork of rubaidh/google_analytics
Description: Rails GA plugin fork w/ using newer GA tracking code
Clone URL: git://github.com/cyu/google_analytics.git
name age message
file README Sat May 17 16:18:29 -0700 2008 added support for new GA code [Calvin Yu]
file Rakefile Tue May 09 04:07:48 -0700 2006 Import new plugin skeleton google_analytics. [mathie]
file init.rb Tue May 09 07:26:35 -0700 2006 * Instead of having to manually add the Google ... [mathie]
directory lib/ Sat May 17 16:18:29 -0700 2008 added support for new GA code [Calvin Yu]
directory test/ Tue May 09 04:07:48 -0700 2006 Import new plugin skeleton google_analytics. [mathie]
README
GoogleAnalytics
===============

This is a quick 'n' dirty module to easily enable Google Analytics support
in your application.  By default it'll output the analytics code for every
single page automatically, if it's configured correctly.  This is done by
adding:

    Rubaidh::GoogleAnalytics.tracker_id = 'UA-12345-67'

to your `config/environment.rb`, inserting your own tracker id. This can be
discovered by looking at the value assigned to +_uacct+ in the Javascript
code.

If you want to disable the code insertion for particular pages, add the following to controllers that don't want it:

    skip_after_filter :add_google_analytics_code

Simple. :-)

NOTE

This version of the plugin uses the new Google Analytics code (ga.js) by
default.  To use the legacy tracking code add the following line to your
`config/environmet.rb`:

    Rubaidh::GoogleAnalytics.legacy_mode = true