dmitrybukhonov/yii2-utm-tags

Yii2 tracking utm metrics

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Type:yii2-extension

pkg:composer/dmitrybukhonov/yii2-utm-tags

dev-master 2020-09-08 16:29 UTC

This package is auto-updated.

Last update: 2025-09-09 03:39:53 UTC


README

Installation

Either run

php composer.phar require --prefer-dist dmitrybukhonov/yii2-utm-tags "*"

or

composer require --prefer-dist dmitrybukhonov/yii2-utm-tags "*" 

or add to the require section of your composer.json.

"dmitrybukhonov/yii2-utm-tags": "*"

Usage as controller behavior

You need to register the module in frontend/config/main.php :

$config = [
    'on beforeAction' => function ($event) {
        $requestService = new \frontend\services\CityDetectionService();
        $requestService->handleBeforeActionEvent($event);
        $utmService = new UtmService();
        $utmService->setUtm();
    },
]

Licence

MIT