Skip to content

Official ruby client interface to the Mixpanel (Web Analytics) API

License

Notifications You must be signed in to change notification settings

jasonlogsdon/mixpanel_client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mixpanel API Client (for API version 2.0)

Ruby access to the Mixpanel web analytics tool.

Mixpanel Data API Reference

Installation

gem install mixpanel_client

or if you use a Gemfile

gem 'mixpanel_client'

Usage

require 'rubygems'
require 'mixpanel_client'

config = {'api_key' => 'changeme', 'api_secret' => 'changeme'}
client = Mixpanel::Client.new(config)

data = client.request do
  # Available options
  resource  'events/properties'
  event     '["test-event"]'
  name      'hello'
  values    '["uno", "dos"]'
  type      'general'
  unit      'hour'
  interval   24
  limit      5
  bucket    'contents'
  from_date '2011-08-11'
  to_date   '2011-08-12'
  on        'properties["product_id"]'
  where     '1 in properties["product_id"]'
  buckets   '5'
end

puts data.inspect

Changelog

2.0.1

  • Added options used in segmentation resources.

2.0.0

  • Manually tested compatibility with Mixpanel gem.

2.0.0.beta2

  • Added JSON to gemspec for ruby versions less than 1.9.

2.0.0.beta1

  • Reverted to namespacing via module name because it's a better practice. I.e. Use Mixpanel::Client instead of MixpanelClient.
  • Added 'values' as an optional parameter
  • gem install mixpanel_client --pre

1.0.1

  • Minor housekeeping and organizing
  • Refactored specs

1.0.0

  • Changed "Mixpanel" class name to "MixpanelClient" to prevent naming collision in other libraries. a710a84e8ba4b6f018b7

Collaborators and Maintainers

Keolo Keagy (Author)
Mike Ferrier
Grzegorz Forysinski
Nathan Chong
Paul McMahon
Chad Etzel

Copyright

Copyright (c) 2009+ Keolo Keagy. See LICENSE for details.

About

Official ruby client interface to the Mixpanel (Web Analytics) API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%