yii2-yandex-metrika
Yii2 widget to add Yandex.Metrika counter on page
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require "dkushnikov/yii2-yandex-metrika" "*"
or add
"dkushnikov/yii2-yandex-metrika" : "*"
to the require section of your application's composer.json
file.
Usage
use yii\widgets\YandexMetrikaCounter;
<?= YandexMetrikaCounter::widget(
[
'counterId' => 12345,
]
) ?>