README.md in analytics-rails-0.2.1 vs README.md in analytics-rails-0.3.0

- old
+ new

@@ -3,12 +3,18 @@ [![Build Status](https://travis-ci.org/mmontossi/analytics-rails.svg)](https://travis-ci.org/mmontossi/analytics-rails) [![Dependency Status](https://gemnasium.com/mmontossi/analytics-rails.svg)](https://gemnasium.com/mmontossi/analytics-rails) # Analytics Rails -Adds a simple helper to create the google analytics include tag. +Adds a helper to create the google analytics script in rails. +## Why + +I did this gem to: + +- Have a simple but versatile way to include google analytics. + ## Install Put this line in your Gemfile: ```ruby gem 'analytics-rails' @@ -19,25 +25,25 @@ $ bundle ``` ## Usage -In your layout add a line like this in your head: +In your layout add a line like this in your head or before close body: ```erb <%= google_analytics_include_tag 'your-id' %> ``` -You can add custom events: +You can add variables: ```erb -<%= google_analytics_include_tag 'your-id', events: [['Popup', 'Click']] %> +<%= google_analytics_include_tag 'your-id', user: 1 %> ``` -And custom variables: +And custom events after the include tag: ```erb -<%= google_analytics_include_tag 'your-id', variables: [[1, 'Member', 'Yes', 1]] %> +<%= google_analytics_event_tag 'popup', 'click' %> ``` -NOTE: Will only show the include tag in production environment. +NOTE: Will only show the tags in production environment. ## Credits This gem is maintained and funded by [mmontossi](https://github.com/mmontossi).