tga/audience
最新稳定版本:v0.1.0-alpha
Composer 安装命令:
composer require tga/audience
包简介
Audience statistics bundle for Symfony2
README 文档
README
TgaAudienceBundle is a complete, extensible and flexible bundle for Symfony 2 to track your website audience and visitors behaviors easily.
Its aim is to be as simple as possible to install and to use.
This bundle is not maintained anymore. You can use the Stat/Processor.php and
Listener/KernelListener.php files to create your own bundle (it's very easy), but
this one won't be updated and should not be used.
Installation
TgaAudience is a classic bundle, made for Symfony 2.2. You can use Composer to install it:
{
"require": {
"tga/audience": "dev-master"
}
}
As a classic bundle, load it in your kernel :
$bundles = array(
// ...
new Tga\AudienceBundle\TgaAudienceBundle(),
// ...
);
The bundle requires to store datas in the database. So, using doctrine, run:
php app/console doctrine:schema:update --force
To create the two required tables.
After that, the bundle will run by itself. It will save required datas at the good time and will manage with HTTP requests to find the better way to store them. You don't need to worry about it!
Usage
You may now want to view the datas stored by the bundle. There are two ways to do that:
Using the default interface
The default interface is available by default. You just need to load routing:
tga_audience:
resource: "@TgaAudienceBundle/Controller/"
type: annotation
prefix: /audience
And install the assets:
php app/console assets:install
Now, you can access the interface on http://mydomain.com/audience
Using a custom interface
The default interface is just a simple way to display your statistics, but you may want to restrict access, or load some more datas. If you want to create a custom display of your stats, it's really easy.
The bundle give you a service to access all the calculated stats that you could view in the default
interface: this service is tga_audience.stats. Using it, you get the processor (the object that
analyse datas to find stats) and then every stat you want:
$processor = $this->get('tga_audience.stats')->getProcessor();
$processor->getUniqueVisitors();
$processor->getUniqueVisitorsCount();
$processor->getPageCalls();
$processor->getPageCallsCount();
$processor->getAverageVisitedPages();
$processor->getAverageDuration();
$processor->getAverageTimeToLoad();
$processor->getPlatforms();
$processor->getBrowsers();
$processor->getMostUsedRoutes();
$processor->getBrowsersVersions();
$processor->getExternalSources();
$processor->getMostUsedExternalSources();
Configuration
The default configuration is:
tga_audience:
session_duration: 300 # Duration meanwhile a visitor is unique
disabled_routes: [] # List of disabled routes to not track with the bundle
environnements: ['prod'] # List of environnements where the bundle will track requests
License
Apache (see LICENSE.md).
tga/audience 适用场景与选型建议
tga/audience 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 114 次下载、GitHub Stars 达 0, 最近一次更新时间为 2013 年 01 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「stats」 「statistics」 「Audience」 「visitors」 「analystics」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tga/audience 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tga/audience 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tga/audience 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Helper to handle stats table with multiple formatter
The "View Counter" bundle
SPSS is a php-based implementation of IBM SPSS Statistics Standard. (Read/write SPSS, PSPP .sav files)
TYPO3 View-Statistics by coding.ms: Logs frontend actions in TYPO3 and displays them in a backend module. It tracks page views, news, downloads, and objects such as products or real estate, while custom objects can be configured via TypoScript. Frontend logins, login duration, user ID, IP address, a
Rserve client library for PHP
Partition problem for balanced arrays splitting made easy.
统计信息
- 总下载量: 114
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache
- 更新时间: 2013-01-05