2017 © Pedro Peláez
 

library amplitude-php

image

hostinger/amplitude-php

  • Monday, June 13, 2016
  • by fordnox
  • Repository
  • 2 Watchers
  • 0 Stars
  • 980 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

Amplitude PHP

Install

composer require hostinger/amplitude-php, (*1)

How to use it


require_once 'vendor/autoload.php'; $apiKey = '123'; $amplitudeClient = new Amplitude\AmplitudeClient($apiKey); $amplitudeEvent = new Amplitude\Message\Event(); // For user properties $amplitudeEvent ->set('eventType', 'test.event') ->set('userId', 1) ->set('deviceId', 1) ->set('city_id', 1) ->set('country_id', 1); // For event properties $amplitudeEvent ->addToEventProperties('revenue', 1); try { $response = $amplitudeClient->track($amplitudeEvent); print 'event tracked'; } catch (Exception $e) { print $e->getMessage(); }

The Versions

13/06 2016

dev-master

9999999-dev

  Sources   Download

The Requires

 

13/06 2016

1.0.0

1.0.0.0

  Sources   Download

The Requires