Skip to content
/ rack-piwik Public
forked from maxwell/rack-piwik

Rack Middleware to help with adding piwik js in every request

License

Notifications You must be signed in to change notification settings

GSI/rack-piwik

This branch is 8 commits behind maxwell/rack-piwik:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e829bc2 · Mar 18, 2013

History

24 Commits
Mar 18, 2013
Sep 11, 2012
May 4, 2012
May 4, 2012
May 4, 2012
Jan 5, 2012
Mar 18, 2013
Jul 21, 2012
Mar 18, 2013
Mar 18, 2013

Repository files navigation

Rack Piwik

Adapted from Rack::Piwik

Simple Rack middleware to help injecting the Piwik tracking code into the footer of your websites.

Usage

Gemfile:

gem 'rack-piwik', :require => 'rack/piwik'

Sinatra

## app.rb
use Rack::Piwik, :piwik_url => '<url of your piwik site here>', :piwik_id => '<your piwik id here>'

Padrino

## app/app.rb
use Rack::Piwik, :piwik_url => '<url of your piwik site here>', :piwik_id => '<your piwik id here>'

Rails

## application.rb:
config.gem 'rack-piwik', :lib => 'rack/piwik'
config.middleware.use Rack::Piwik, :piwik_url => '<url of your piwik site here>', :piwik_id => '<your piwik id here>'

Thread Safety

This middleware should be thread safe. Although my experience in such areas is limited, having taken the advice of those with more experience; I defer the call to a shallow copy of the environment, if this is of consequence to you please review the implementation.

Change Log

  • 0.2.0 Use asynchronous JS tracking code by default
  • 0.1.0 Initial Release

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2009-2011 Lee Hambley. See LICENSE for details. With thanks to Ralph von der Heyden http://github.com/ralph/ and Simon cimm Schoeters http://github.com/cimm/ - And the biggest hand to Arthur achiu Chiu for the huge work that went into the massive 0.9 re-factor.

About

Rack Middleware to help with adding piwik js in every request

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 81.4%
  • Perl 15.9%
  • Shell 2.7%