Permalink
Browse files

Improve syntax coloration in README

  • Loading branch information...
1 parent 280ccf9 commit d5f2070c9d1d74259dc60105e3690754c353b0c5 @rymai rymai committed Aug 16, 2012
Showing with 21 additions and 9 deletions.
  1. +21 −9 README.md
View
@@ -7,22 +7,32 @@ This middleware injects either the synchronous or asynchronous Google Analytics
## Usage
#### Gemfile
- gem 'rack-google-analytics'
+
+```ruby
+gem 'rack-google-analytics'
+```
#### Sinatra
- ## app.rb
- use Rack::GoogleAnalytics, :tracker => 'UA-xxxxxx-x'
+
+```ruby
+## app.rb
+use Rack::GoogleAnalytics, :tracker => 'UA-xxxxxx-x'
+```
#### Padrino
- ## app/app.rb
- use Rack::GoogleAnalytics, :tracker => 'UA-xxxxxx-x'
+```ruby
+## app/app.rb
+use Rack::GoogleAnalytics, :tracker => 'UA-xxxxxx-x'
+```
#### Rails 2.X
- ## environment.rb:
- config.gem 'rack-google-analytics', :lib => 'rack/google-analytics'
- config.middleware.use Rack::GoogleAnalytics, :tracker => 'UA-xxxxxx-x'
+```ruby
+## environment.rb:
+config.gem 'rack-google-analytics', :lib => 'rack/google-analytics'
+config.middleware.use Rack::GoogleAnalytics, :tracker => 'UA-xxxxxx-x'
+```
### Options
@@ -32,7 +42,9 @@ This middleware injects either the synchronous or asynchronous Google Analytics
Note: since 0.2.0 this will use the asynchronous Google Analytics tracking code, for the traditional behaviour please use:
- use Rack::GoogleAnalytics, :tracker => 'UA-xxxxxx-x', :async => false
+```ruby
+use Rack::GoogleAnalytics, :tracker => 'UA-xxxxxx-x', :async => false
+```
If you are not sure what's best, go with the defaults, and read here if you should opt-out.

0 comments on commit d5f2070

Please sign in to comment.