Sha256: 7fc65fa198fcd76a33d5cfba77b0cfcbfa8471e79baf095459596a04e59d4c91

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/museways/analytics-rails/badges/gpa.svg)](https://codeclimate.com/github/museways/analytics-rails) [![Build Status](https://travis-ci.org/museways/analytics-rails.svg?branch=master)](https://travis-ci.org/museways/analytics-rails) [![Dependency Status](https://gemnasium.com/museways/analytics-rails.svg)](https://gemnasium.com/museways/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 [museways](http://museways.com).

## 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.0 README.md