freyo/mta-h5

Mobile Tencent Analytics HTML5 的 PHP SDK

1.0 2019-04-21 13:55 UTC

This package is auto-updated.

Last update: 2024-08-29 04:54:48 UTC


README

Mobile Tencent Analytics HTML5 的 PHP SDK

Software License Quality Score Packagist Version

安装

composer require freyo/mta-h5

引导

<?php
use Freyo\MtaH5\Application;

include __DIR__ . '/vendor/autoload.php';

$config = [
    'app_id' => 'your-app-id',
    'secret_key' => 'your-secret-key',
];

$app = new Application($config);

API

$app->trend->query($startDate, $endDate);
$app->trend->realtime();
$app->trend->heartbeat();

$app->user->realtime($page = 1);
$app->user->compare($startDate, $endDate);
$app->user->portrait($startDate, $endDate);

$app->device->query($startDate, $endDate, $typeId, $typeContents = []);
$app->device->operator($startDate, $endDate, $typeIds);
$app->device->area($startDate, $endDate, $typeIds);
$app->device->province($startDate, $endDate, $typeIds);

$app->page->realtime();
$app->page->offline($startDate, $endDate, $page = 1);
$app->page->query($startDate, $endDate, $urls);
$app->page->depth($startDate, $endDate);
$app->page->speed($startDate, $endDate, $typeContents, $type);

$app->custom->query($startDate, $endDate, $custom);

$app->source->query($startDate, $endDate, $urls);
$app->source->land($startDate, $endDate, $urls);
$app->source->leave($startDate, $endDate, $urls);

$app->adtag->query($startDate, $endDate, $adTags);

在 Laravel 中使用

Laravel 5.5+ 使用包自动发现,因此不需要您手动添加 ServiceProvider。

$app = app('mta-h5');

许可证

MIT 许可证 (MIT)。请参阅 许可证文件 获取更多信息。

FOSSA Status