halfdan / piwik-ruby-tracking

A Ruby Gem that allows you to add the Piwik Tracking Code to Sinatra, Padrinorb and Rails
MIT License
52 stars 33 forks source link

Errors when rendering xml and other non-html formats #1

Closed david-shockley closed 13 years ago

david-shockley commented 13 years ago

PiwikAnalytics::Config already has an enabled?(format) method, seemingly for this very purpose, but its never called It's a useful feature (for me anyway), but its not actually in use.

Adding 'if Config.enabled? request.format' to the add_piwik_analytics_tracking method is all thats needed, I think.