Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 reportgrid.gemspec
README.markdown

ReportGrid Ruby Client Library

Usage

Add the following to your Gemfile

git 'git@github.com:softwaregravy/reportgrid-client.git' do  
    gem 'reportgrid' 
 end                 

run bundle install

Rails Use

Note: this is just how I did it, you're free to do it however

create a file config/initializers/reportgrid.rb and add:

REPORTGRID_TOKEN = ENV['REPORTGRID_TOKEN'] 

module ReportGrid
  def self.client
      ReportGrid::ReportGrid.new(REPORTGRID_TOKEN) 
  end 
end 

Wherever you want to track events, you can now do:

ReportGrid.client.track(PATH, EVENT_NAME, ATTRIBUTES, :rollup => [true|false])

Lets say you have an object called impression:

ReportGrid.client.track("/tracking_set/#{@impression.common_value}", "impression", @impression.attributes, :rollup => true)

This should let you group stats of impressions by common value, and also show stats rolled up to the tracking set level

Something went wrong with that request. Please try again.