PHPackages                             tiitoo/tga - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tiitoo/tga

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

tiitoo/tga
==========

Audience statistics bundle for Symfony2

010[1 issues](https://github.com/TiiToo/tga/issues)PHP

Since Sep 21Pushed 10y ago1 watchersCompare

[ Source](https://github.com/TiiToo/tga)[ Packagist](https://packagist.org/packages/tiitoo/tga)[ RSS](/packages/tiitoo-tga/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

TgaAudienceBundle
=================

[](#tgaaudiencebundle)

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

[](#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
-----

[](#usage)

You may now want to view the datas stored by the bundle. There are two ways to do that:

### Using the default interface

[](#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

### Using a custom interface

[](#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
-------------

[](#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
-------

[](#license)

Apache (see LICENSE.md).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4389101?v=4)[TiiToo](/maintainers/TiiToo)[@TiiToo](https://github.com/TiiToo)

---

Top Contributors

[![TiiToo](https://avatars.githubusercontent.com/u/4389101?v=4)](https://github.com/TiiToo "TiiToo (1 commits)")

### Embed Badge

![Health badge](/badges/tiitoo-tga/health.svg)

```
[![Health](https://phpackages.com/badges/tiitoo-tga/health.svg)](https://phpackages.com/packages/tiitoo-tga)
```

PHPackages © 2026

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