userlog/php
最新稳定版本:v1.0.2
Composer 安装命令:
composer require userlog/php
包简介
UserLog PHP SDK
README 文档
README
Installation
composer require userlog/php
Usage
Initialize Client
use UserLog\PHP\Client; $userlog = new Client('<API_KEY>', '<PROJECT_NAME>');
The project name will be auto-injected in all requests.
Log
// The channel name, event name and user_id are the only required parameters. $userlog->log('subscriptions', 'User subscribed!', 'user@example.com'); // Other parameters can be added when needed. $userlog->log( channel: 'subscriptions', event: 'User subscribed!', user_id: 'user@example.com', description: 'A new user subscribed to the premium plan.', icon: '👍🏼', notify: true, tags: [ 'payment-method' => 'card', 'plan' => 'monthly', ], );
Identify
// Both the user id and the properties are required. $userlog->identify( userId: 'user@example.com', properties: [ 'active' => 'yes', 'signed-in' => 'no', ], );
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-11