Sha256: cfcf3e59afe0f89f1ed42693c138fcd06dfd687e9ac9a8e2ac8b8013a4813ddd
Contents?: true
Size: 1.28 KB
Versions: 1
Compression:
Stored size: 1.28 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 simple helper to create the google analytics include tag. ## 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: ```erb <%= google_analytics_include_tag 'your-id' %> ``` You can add custom events: ```erb <%= google_analytics_include_tag 'your-id', events: [['Popup', 'Click']] %> ``` And custom variables: ```erb <%= google_analytics_include_tag 'your-id', variables: [[1, 'Member', 'Yes', 1]] %> ``` NOTE: Will only show the include tag 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
analytics-rails-0.2.1 | README.md |