ricbra/php-kissmetrics-api

Guzzle based implementation of KISSmetrics REST API

Maintainers

👁 ricbra

Package info

github.com/ricbra/php-kissmetrics-api

pkg:composer/ricbra/php-kissmetrics-api

Statistics

Installs: 1 115

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 0

dev-master / 1.0.x-dev 2014-12-24 10:53 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT adcf7a0cb5fa0ccc1ce3d0f502798e7df878700f

  • Richard van den Brand <richard.woop@vandenbrand.org>

apikissmetrics

This package is not auto-updated.

Last update: 2026-06-16 11:26:01 UTC


README

👁 Build Status
👁 Latest Stable Version
👁 Total Downloads
👁 License
👁 Quality

This library is a PHP 5.4 implementation of the KISSmetrics API

This client is build using Guzzle 4.0.

License

This library is released under the MIT license. See the complete license in the LICENSE file.

Installation

Start by installing composer. Next do:

$ composer require ricbra/php-kissmetrics-api

Requirements

PHP >=5.4.0

Usage

Creating a new instance:

<?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',
]);