2017 © Pedro Peláez
 

library segment-php-sdk

Segment.com PHP SDK

image

cdnsteve/segment-php-sdk

Segment.com PHP SDK

  • Monday, November 30, 2015
  • by cdnsteve
  • Repository
  • 0 Watchers
  • 0 Stars
  • 5,081 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 17 % Grown

The README.md

Segment PHP SDK

PHP SDK for working with the Segment.com analytics API. Uses PHP namespaces, GuzzleHttp and Composer., (*1)

Build Status, (*2)

Please note this is in heavy development and should not yet be used in production., (*3)

Installation:

composer require cdnsteve/segment-php-sdk, (*4)

Examples:

<?php
require __DIR__ . '/vendor/autoload.php';

use CdnSteve\Segment\Segment;
use CdnSteve\Segment\Analytics;

Segment::config([
  'api_key' => 'YOUR_API_KEY',
  'timeout' => 2.0, // HTTP request in seconds.
  ]);

// Setup unique identity to track.
Analytics::identify([
  'userId'=> '5114'
]);

// Track it!
Analytics::track([
  'userId'=> '5114',
  'event' => 'Purchase item',
  'properties' => [
    'product' => 'Solution 10',
    'premium_frequency' => 'monthly',
    'insurance_coverage' => 250000,
    'premium' => 50.35,
  ]
]);

License:

MIT License, (*5)

The Versions

30/11 2015

dev-master

9999999-dev

Segment.com PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

segment segment.com segment php segment php library

30/11 2015

v1.0.0

1.0.0.0

Segment.com PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

segment segment.com segment php segment php library

26/11 2015

v1.0.0-beta

1.0.0.0-beta

Segment.com PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

segment segment.com segment php segment php library