ricbra/php-kissmetrics-api
Composer 安装命令:
composer require ricbra/php-kissmetrics-api
包简介
Guzzle based implementation of KISSmetrics REST API
关键字:
README 文档
README
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', ]);
统计信息
- 总下载量: 1.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-10