PHPackages                             willarin/yii2-tracker - 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. willarin/yii2-tracker

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

willarin/yii2-tracker
=====================

tracking user sessions

01PHP

Since Jan 12Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-tracker
============

[](#yii2-tracker)

This extension provides the third party tracking functionality which could be easily integrated into your project. The module is also intended for registration of information about a separate user session, data about the user's device and browser, his behavior on the site during a visit.

Documentation
-------------

[](#documentation)

### 1. Installation

[](#1-installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require willarin/yii2-tracker "*"

```

or add

```
"willarin/yii2-tracker": "*"

```

to the required section of your `composer.json` file.

### 2. Migrations

[](#2-migrations)

Before using this extension, we need to prepare the database.

```
php yii migrate --migrationPath=@willarin/tracker/migrations

```

### 3. Usage

[](#3-usage)

Each unique user's URL visit should be registered within a module. Our recommendation is to use bariew/yii2-event-component - eg.

```
'eventManager' => [
            'class' => 'bariew\eventManager\EventManager',
            'events' => [
                'module\controllers\IndexController' => [
                    'beforeAction' => [
                        ['willarin\tracker\models\SessionUrl', 'saveUrlVisit'],
                    ],
                ],
            ]
        ],
```

Once the extension is installed, modify your application configuration to include:

```
return [
	'modules' => [
	    ...
            'tracker' => [
                'class' => 'willarin\tracker\Module',
            ]
	    ...
	],
	...
]
```

#### Tables used

[](#tables-used)

*Session* This table stores data about cookies, server variables for the session, device type, OS, browser, click's cost and income received from a specific click.

*SessionUrl* This table stores data about each url visited by the user, duration of url's visit, number of scrolls up and down for a specific url.

*SessionEvent* This table stores custom data about events, each event could be associated with a certain URL

*Person* This table stores data about customer and his cookie string identifier

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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://www.gravatar.com/avatar/41fe2e71f30acc9ad324f0898720cdd250d17b0742ea7616bc1a7facb3e1a47d?d=identicon)[solutlux](/maintainers/solutlux)

---

Top Contributors

[![willarin](https://avatars.githubusercontent.com/u/6641982?v=4)](https://github.com/willarin "willarin (9 commits)")

### Embed Badge

![Health badge](/badges/willarin-yii2-tracker/health.svg)

```
[![Health](https://phpackages.com/badges/willarin-yii2-tracker/health.svg)](https://phpackages.com/packages/willarin-yii2-tracker)
```

PHPackages © 2026

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