Sha256: d23d2e2a7b843ade30caed4258b974a11c0221ec365f13f83afc5d21de745921
Contents?: true
Size: 1.34 KB
Versions: 2
Compression:
Stored size: 1.34 KB
Contents
[![Gem Version](https://badge.fury.io/rb/analytics-rails.svg)](http://badge.fury.io/rb/analytics-rails) [![Code Climate](https://codeclimate.com/github/mmontossi/analytics-rails/badges/gpa.svg)](https://codeclimate.com/github/mmontossi/analytics-rails) [![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 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' ``` Then bundle: ``` $ bundle ``` ## Usage 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 variables: ```erb <%= google_analytics_include_tag 'your-id', user: 1 %> ``` And custom events after the include tag: ```erb <%= google_analytics_event_tag 'popup', 'click' %> ``` NOTE: Will only show the tags in production environment. ## Credits This gem is maintained and funded by [mmontossi](https://github.com/mmontossi). ## License It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
analytics-rails-0.3.3 | README.md |
analytics-rails-0.3.0 | README.md |