2017 © Pedro Peláez
 

library php-kissmetrics-api

Guzzle based implementation of KISSmetrics REST API

image

ricbra/php-kissmetrics-api

Guzzle based implementation of KISSmetrics REST API

  • Wednesday, December 24, 2014
  • by ricbra
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,104 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

KISSmetrics Api

Build Status Latest Stable Version Total Downloads License Quality, (*1)

This library is a PHP 5.4 implementation of the KISSmetrics API , (*2)

This client is build using Guzzle 4.0., (*3)

License

This library is released under the MIT license. See the complete license in the LICENSE file., (*4)

Installation

Start by installing composer. Next do:, (*5)

$ composer require ricbra/php-kissmetrics-api

Requirements

PHP >=5.4.0, (*6)

Usage

Creating a new instance:, (*7)

<?php
$client = \KISSmetrics\ClientFactory::factory('your-api-key-here', [
    'defaults' => [
        'headers' => ['User-Agent' => 'your-app-name/1.0.0 +https://yourapp.com']
    ]
]);

Set user properties

<?php

$client->setProperties([
    '_p' => 'Facebook #23',
    '_d' => 1,
    '_t' => 21421421,
    'Property' => 'Value'
]);

Record event

<?php

$client->recordEvent([
    '_p' => 'Facebook #23',
    '_n' => 'Test event',
    '_t' => 12421412,
    '_d' => 1,
    'Property' => 'Value',
]);

Alias user

<?php

$client->recordEvent([
    '_p' => 'Facebook #23',
    '_n' => 'Test event',
    '_t' => 12421412,
    '_d' => 1,
    'Property' => 'Value',
]);

The Versions

24/12 2014

dev-master

9999999-dev

Guzzle based implementation of KISSmetrics REST API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Richard van den Brand

api kissmetrics