tiitoo/tga 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

tiitoo/tga

Composer 安装命令:

composer require tiitoo/tga

包简介

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.

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).

tiitoo/tga 适用场景与选型建议

tiitoo/tga 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 09 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「stats」 「statistics」 「Audience」 「visitors」 「analystics」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 tiitoo/tga 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 tiitoo/tga 我们能提供哪些服务?
定制开发 / 二次开发

基于 tiitoo/tga 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache
  • 更新时间: 2015-09-21