kangguru/rack-google-analytics — pull request #38 by fddayan (2014-01-14 16:26:07+00:00)
Title: :if option that accepts lambdas added to skip middleware

`:if` option added to skip google analytics if returns false.

A `lambda` might be used, so we can do something like

Rack::GoogleAnalytics,
:tracker => lambda { |env| return env[:ga_tracking_code] },
:if => lambda { |env| return !env[:ga_tracking_code].nil? }

We can check for any of the variables of in `env`.

It would be possible to disabled GA for `controllers` or `controllers actions` using `before_filter`