PHPackages                             hoongbin/sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hoongbin/sdk-php

ActiveLibrary

hoongbin/sdk-php
================

PHP SDK for Beta Data

0.1.2(5y ago)1232MITPHPPHP &gt;=5.5.0

Since Mar 11Pushed 5y ago2 watchersCompare

[ Source](https://github.com/hoongbin/sdk-php)[ Packagist](https://packagist.org/packages/hoongbin/sdk-php)[ Docs](http://betadata.io)[ RSS](/packages/hoongbin-sdk-php/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (5)Used By (0)

betadata
========

[](#betadata)

版本
--

[](#版本)

版本时间0.1.02019年7月30日安装
--

[](#安装)

通过composer安装

```
composer require hoongbin/sdk-php "dev-master"
```

或添加配置到项目目录下的composer.json

```
"require": {
...
"hoongbin/sdk-php": "dev-master",
...
}

```

配置
--

[](#配置)

在组件配置中配置

```
'betadata' => [
            'class' => 'hoongbin\sdkphp\BetaData',
            'appId' => '182348345923',
            'token' => 'ca6e7e122466f2d3062633cd0de8c751',
            'project' => 'moego',
            'options' => [
                'url' => 'http://api.betadata.io/tracks',
            ],
            'on beforeProperties' => function ($event) {
                $beforeProperties = $event->sender;
                // 获取请求头信息
                $header = isset(Yii::$app->request->headers) ? Yii::$app->request->headers : null;

                // 数据组装
                $beforeProperties->properties['event_properties'] = [
                    // 设备号
                    '_device_id' => isset($header['dd']) ? $header['dd'] : null,
                    // 操作系统
                    '_os' => isset($header['o']) ? $header['o'] : null,
                    // 操作系统版本
                    '_os_version' => isset($header['sv']) ? $header['sv'] : null,
                    // 应用的版本
                    '_app_version' => isset($header['n']) ? $header['n'] : null,
                    // 屏幕宽度
                    '_screen_width' => isset($header['w']) ? (int)$header['w'] : null,
                    // 屏幕高度
                    '_screen_height' => isset($header['h']) ? (int)$header['h'] : null,
                    // 设备型号
                    '_model' => isset($header['m']) ? $header['m'] : null,
                    // 设备制造商
                    '_manufacturer' => isset($header['ma']) ? $header['ma'] : null,
                    // 网络类型
                    '_network_type' => isset($header['l']) ? $header['l'] : null,
                    // 页面地址
                    '_url' => isset(Yii::$app->request->url) ? Yii::$app->request->getHostInfo() . Yii::$app->request->url : null,
                    // 客户端IP
                    '_ip' => isset(Yii::$app->request->userIP) ? Yii::$app->request->userIP : null
                ];
            }
        ],
```

使用
--

[](#使用)

```
Yii::$app->betadata->track("_app_install", ["label" => "安装"], ['uid' => 123456]);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~70 days

Total

3

Last Release

2116d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55e9259515b7fedaf93eebfde158862cbc16d30e2345cf95b2bcf97dfa92ade6?d=identicon)[87003637](/maintainers/87003637)

---

Top Contributors

[![hoongbin](https://avatars.githubusercontent.com/u/14089088?v=4)](https://github.com/hoongbin "hoongbin (12 commits)")[![a740212910](https://avatars.githubusercontent.com/u/20339706?v=4)](https://github.com/a740212910 "a740212910 (1 commits)")

---

Tags

sdkbetadata

### Embed Badge

![Health badge](/badges/hoongbin-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/hoongbin-sdk-php/health.svg)](https://phpackages.com/packages/hoongbin-sdk-php)
```

###  Alternatives

[aws/aws-crt-php

AWS Common Runtime for PHP

416300.1M4](/packages/aws-aws-crt-php)[appwilio/cdek-sdk

CDEK API SDK (cdek.ru)

406.5k](/packages/appwilio-cdek-sdk)[mocking-magician/coinbase-pro-sdk

Library for coinbase pro API calls

223.2k](/packages/mocking-magician-coinbase-pro-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
