GithubHelp home page GithubHelp logo

agileanimal / mixpanel_client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keolo/mixpanel_client

1.0 2.0 0.0 168 KB

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

License: MIT License

Ruby 100.00%

mixpanel_client's Introduction

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"]'
  timezone  '-8'
  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.2

  • Added timezone to available options.
  • All exceptions can be caught under Mixpanel::Error.

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)
Jason Logsdon
James R
Mike Ferrier
Mike Ferrier
Grzegorz Forysinski
Nathan Chong
Paul McMahon
Chad Etzel

Copyright

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

mixpanel_client's People

Contributors

keolo avatar pwim avatar hebo avatar idyll avatar jasonlogsdon avatar m5rk avatar mferrier avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.