Download the PHP package growingio/php-sdk without Composer

On this page you can find all versions of the php package growingio/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-sdk

GrowingIO PHP SDK

GrowingIO提供在Server端部署的PHP SDK,从而可以方便的进行事件上报等操作

集成 & 安装

php sdk已经发布在Packagist, 可以通过Composer进行安装

如果没有使用Composer, 可以直接下载源代码到php配置中指定的include_path目录中, 并手动加载类文件

初始化配置

初始化参数
参数 必选 类型 默认值 说明
accountID true string 项目 ID,见数据源配置
host true string 数据收集服务域名,请参考运维手册或联系技术支持获取
dataSourceId true string 数据源 ID,见数据源配置
props false array array() 初始化配置额外参数
初始化配置额外参数
参数 必选 类型 默认值 说明
debug false boolean false debug 模式, 此模式仅打印日志, 不发送数据
idMappingEnabled false boolean false 是否支持设置用户类型, false, 不发送userKey. true, 发送userKey
示例

数据采集API

1. 采集自定义事件

接口功能

发送一个自定义事件。在添加所需要发送的事件代码之前,需要在事件管理用户界面配置事件以及事件级变量

请求参数
参数 必选 类型 默认值 说明
eventKey true string 事件名, 事件标识符
loginUserId false string 登录用户id,与匿名用户id不能同时为空
anonymousId false string 匿名用户id,与登录用户id不能同时为空
evnetTime false int 当前时间的时间戳 事件发生时间。如需要开启"自定义event_time上报"的功能开关,请联系技术支持
loginUserKey false string 登录用户类型
properties false array array() 事件发生时,所伴随的维度信息,1.0.3版本支持value为array
示例

2. 设置登录用户变量

接口功能

以登录用户的身份定义用户属性变量,用于用户信息相关分析

请求参数
参数 必选 类型 默认值 说明
loginUserId false string 登录用户id,与匿名用户id不能同时为空
anonymousId false string 匿名用户id,与登录用户id不能同时为空
properties true array 用户属性信息,1.0.3版本支持value为array
loginUserKey false string 登录用户类型
示例

3. 设置物品模型

接口功能

上传物品模型

请求参数
参数 必选 类型 默认值 说明
itemId true string 物品模型id
itemKey true string 物品模型key
properties false array array() 物品模型属性信息
示例

集成示例


All versions of php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package growingio/php-sdk contains the following files

Loading the files please wait ....