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
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-08-09 01:05:31 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