aztech/event-bus-extra-mixpanel
Composer 安装命令:
composer require aztech/event-bus-extra-mixpanel
包简介
aztech/event-bus Mixpanel publisher provider
README 文档
README
Build status
Stability
Installation
Via Composer
Composer is the only supported way of installing aztech/event-bus-extra-mixpanel . Don't know Composer yet ? Read more about it.
$ composer require "aztech/event-bus-extra-mixpanel":"~1"
Autoloading
Add the following code to your bootstrap file :
require_once 'vendor/autoload.php';
Dependencies
- mixpanel/mixpanel-php : ~2
Supported elements :
- Persistent publish
Configuration options & defaults
| Parameter | Default | Description |
|---|---|---|
project-token |
required | Your Mixpanel project token. |
always-flush |
false |
Whether to flush events after each Mixpanel publish. |
The always-flush parameter is useful if you want to use the plugin in long running processes. By default,
the Mixpanel API flushes sent events only at the end of the execution cycle. This is fine for most cases,
but in long running processes, you can set this option to true to ensure an event is flushed by the API
after each publish.
Initialization
require_once 'vendor/autoload.php'; use \Aztech\Events\Bus\Events; use \Aztech\Events\Bus\Plugins\Mixpanel\Mixpanel; Mixpanel::loadPlugin('mix'); // See options chart for actual parameters $options = array('project-token' => 'YOUR_TOKEN'); $publisher = Events::createPublisher('mix', $options); $event = Events::create('category', array('property' => 'value')); $publisher->publish($event); // ...
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-08-28