2017 © Pedro Peláez
 

library php-sdk

Mixpanel PHP SDK

image

mixpanel/php-sdk

Mixpanel PHP SDK

  • Sunday, June 17, 2012
  • by rodchyn
  • Repository
  • 1 Watchers
  • 2 Stars
  • 87 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Mixpanel PHP SDK

Library include two classes, (*1)

Mixpanel - for data requests., (*2)

MetricsTracker - to track program events, (*3)

Example usage

MetricsTracker, (*4)

$metrics = new MetricsTracker("YOUR_TOKEN");
$metrics->track('purchase', array('item'=>'candy', 'type'=>'snack', 'ip'=>'123.123.123.123'));

Mixpanel, (*5)

$api_key = 'your key';
$api_secret = 'your secret';

$mp = new Mixpanel($api_key, $api_secret);
$data = $mp->request(array('events', 'properties'), array(
   'event' => 'pages',
   'name' => 'page',
   'type' => 'unique',
   'unit' => 'day',
   'interval' => '20',
   'limit' => '20'
));

var_dump($data);

The Versions

17/06 2012

dev-master

9999999-dev https://github.com/mixpanel

Mixpanel PHP SDK

  Sources   Download

Apache2

The Requires

  • php >=5.2.0
  • ext-curl *
  • ext-json *

 

sdk mixpanel