定制 cdnsteve/segment-php-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cdnsteve/segment-php-sdk

最新稳定版本:v1.0.0

Composer 安装命令:

composer require cdnsteve/segment-php-sdk

包简介

Segment.com PHP SDK

README 文档

README

PHP SDK for working with the Segment.com analytics API. Uses PHP namespaces, GuzzleHttp and Composer.

Build Status

Please note this is in heavy development and should not yet be used in production.

Installation:

composer require cdnsteve/segment-php-sdk

Examples:

<?php
require __DIR__ . '/vendor/autoload.php';

use CdnSteve\Segment\Segment;
use CdnSteve\Segment\Analytics;

Segment::config([
  'api_key' => 'YOUR_API_KEY',
  'timeout' => 2.0, // HTTP request in seconds.
  ]);

// Setup unique identity to track.
Analytics::identify([
  'userId'=> '5114'
]);

// Track it!
Analytics::track([
  'userId'=> '5114',
  'event' => 'Purchase item',
  'properties' => [
    'product' => 'Solution 10',
    'premium_frequency' => 'monthly',
    'insurance_coverage' => 250000,
    'premium' => 50.35,
  ]
]);

License:

MIT License

统计信息

  • 总下载量: 7.93k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-24