2017 © Pedro Peláez
 

library php-sdk

image

gosquared/php-sdk

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 5 Versions
  • 10 % Grown

The README.md

GoSquared PHP SDK

The official GoSquared PHP module for integrating the GoSquared API into your PHP app with ease., (*1)

Installation

Available on packagist, (*2)

Usage

Tracking API

See the Tracking API docs site for full documentation., (*3)

Reporting API

The reporting APIs and their functions are listed on Reporting API docs site., (*4)

Quick guide

require_once('gosquared-php-sdk/main.php');

$opts = array(
  'site_token' => 'your-site-token',
  'api_key' => 'your-api-key'
);
$GS = new GoSquared($opts);

// Track events
$result = $GS->track_event('Event Name');

// Create anonymous Person
$person = $GS->create_person();

// Identify person
$response = $person->identify(array(
  'id' => 'user-id',
  'name' => 'Foo Bar',
  'email' => 'foo@bar.com'
));

// Retrieve live data
$result = $GS->now->concurrents();

// Retrieve historical trends and ecommerce data
$result = $GS->trends->aggregate();

Requirements

  • PHP >= 5.2.0
  • cURL

Running tests

make test

To test with your own site token and api key, you can prefix this command with the SITE_TOKEN and API_KEY environment variables containing your keys. WARNING: this will track test data under your account, (*5)

Debugging

To switch on debug logs, place the following define statement before including this library:, (*6)

define('GOSQUARED_DEBUG', true);

Debug output will then be sent to the standard output streams. Common places to find the output are your console (if run with CLI), your web server logs, or php-fpm logs., (*7)

The Versions

08/09 2017

dev-fix-event-request-without-body

dev-fix-event-request-without-body https://github.com/gosquared/php-sdk

  Sources   Download

MIT

analytics tracking event customer

12/04 2016

dev-master

9999999-dev https://github.com/gosquared/php-sdk

  Sources   Download

MIT

analytics tracking event customer

12/04 2016

3.0.1

3.0.1.0 https://github.com/gosquared/php-sdk

  Sources   Download

MIT

analytics tracking event customer

30/07 2015

3.0.0

3.0.0.0 https://github.com/gosquared/php-sdk

  Sources   Download

MIT

analytics tracking event customer

28/04 2015

v2.0.0

2.0.0.0 https://github.com/gosquared/php-sdk

  Sources   Download

MIT

analytics tracking event customer