Skip to content

dbuhonov/yii2-utm-tags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 tracking utm metrics

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

About

Yii2 tracking utm metrics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages