xaneem / clevertap-php
将事件推送到您的 CleverTap 账户,来自您的 PHP 应用程序(非官方封装)
0.1
2016-08-09 14:33 UTC
Requires
- guzzlehttp/guzzle: ^6.2
This package is not auto-updated.
Last update: 2024-09-14 19:20:11 UTC
README
将事件推送到您的 CleverTap 账户,来自您的 PHP 应用程序。这是一个使用官方 API 的非官方封装。
## 安装 使用 Composer 安装
composer require xaneem/clevertap-php
## 示例代码 设置配置文件和推送事件的代码。请确保您已替换您的账户 ID 和密码。这些信息可在 CleverTap 设置仪表板中找到。
require_once "vendor/autoload.php";
$clevertap = new \CleverTap\clevertap(
'YOUR-ACCOUNT-ID',
'YOUR-PASSCODE'
);
// Setting profile and identity information
print_r(
$clevertap->setProfile(
'john@example.com',
[
'Name' => 'John Doe',
'Category' => 'Platinum'
]
)
);
// Pushing an event
print_r(
$clevertap->pushEvent(
'Purchased product',
[
'Amount' => 2,
'Currency' => 'BTC'
]
)
);
许可证
MIT 许可证