PHPackages                             yii-dream-team/yii2-tracking-controller - 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. yii-dream-team/yii2-tracking-controller

ActiveYii-extension

yii-dream-team/yii2-tracking-controller
=======================================

Yii2 tracking controller behavior

1.0.0(11y ago)81.7k3MITPHPPHP &gt;=5.4.0

Since Jan 26Pushed 10y ago4 watchersCompare

[ Source](https://github.com/yii-dream-team/yii2-tracking-controller)[ Packagist](https://packagist.org/packages/yii-dream-team/yii2-tracking-controller)[ RSS](/packages/yii-dream-team-yii2-tracking-controller/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Yii2 tracking controller behavior
=================================

[](#yii2-tracking-controller-behavior)

Yii2 controller behavior that captures tracking params from the query. Captured parameters are stored in session and you can access them any time.

Installation
------------

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist yii-dream-team/yii2-tracking-controller "*"

```

or add

```
"yii-dream-team/yii2-tracking-controller": "*"

```

to the `require` section of your composer.json.

### Usage as controller behavior

[](#usage-as-controller-behavior)

Attach the behavior to your controller class:

```
public function behaviors()
{
    return [
        'utm_campaign' => [
            'class' => '\yiidreamteam\behaviors\TrackingController',
            'queryParam' => 'utm_campaign',
            'sessionParam' => 'utm_campaign',
        ],
		'utm_source' => [
            'class' => '\yiidreamteam\behaviors\TrackingController',
            'queryParam' => 'utm_source',
            'sessionParam' => 'utm_source',
        ],
    ];
}

```

Single param tracking:

```
$utmCampaign = $this->trackingParam;

```

Or

```
$utmCampaign = $this->getTrackingParam('unknown_campaign');

```

Tracking multiple parameters:

```
$utmSource = $this->behaviors['utm_source']->trackingParam;
$utmCampaign = $this->behaviors['utm_campaign']->trackingParam;

```

Or:

```
$utmSource = $this->behaviors['utm_source']->getTrackingParam('unknown_source');
$utmCampaign = $this->behaviors['utm_campaign']->getTrackingParam('unknown_campaign');

```

Licence
-------

[](#licence)

MIT

Links
-----

[](#links)

-

###  Health Score

32

—

LowBetter than 74% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4072d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1297270?v=4)[Vahid G](/maintainers/lagman)[@lagman](https://github.com/lagman)

---

Top Contributors

[![metalagman](https://avatars.githubusercontent.com/u/1983796?v=4)](https://github.com/metalagman "metalagman (3 commits)")[![BioSin](https://avatars.githubusercontent.com/u/1442288?v=4)](https://github.com/BioSin "BioSin (1 commits)")

---

Tags

urltrackingyii2Behaviorcontroller

### Embed Badge

![Health badge](/badges/yii-dream-team-yii2-tracking-controller/health.svg)

```
[![Health](https://phpackages.com/badges/yii-dream-team-yii2-tracking-controller/health.svg)](https://phpackages.com/packages/yii-dream-team-yii2-tracking-controller)
```

###  Alternatives

[voskobovich/yii2-linker-behavior

This behavior makes it easy to maintain many-to-many and one-to-many relations in your ActiveRecord models.

80313.6k9](/packages/voskobovich-yii2-linker-behavior)[mdmsoft/yii2-autonumber

Auto number extension for the Yii framework

1830.9k](/packages/mdmsoft-yii2-autonumber)[baibaratsky/yii2-serialized-attributes-behavior

Yii2 Serialized Attributes Behavior

1173.6k8](/packages/baibaratsky-yii2-serialized-attributes-behavior)[mdmsoft/yii2-ar-behaviors

Behaviors for Yii2

1824.5k1](/packages/mdmsoft-yii2-ar-behaviors)[valentinek/yii2-closure-table-behavior

This extension allows you to get functional for closure table trees.

1615.3k](/packages/valentinek-yii2-closure-table-behavior)

PHPackages © 2026

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