PHP code example of tomlutzenberger / yii2-googleanalytics
1. Go to this page and download the library: Download tomlutzenberger/yii2-googleanalytics library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tomlutzenberger / yii2-googleanalytics example snippets
<?= \TomLutzenberger\GoogleAnalytics\GoogleAnalytics::widget()
return [
// ...
'gaId' => YII_ENV_PROD ? 'UA-1234567-01' : '',
];
<?= \TomLutzenberger\GoogleAnalytics\GoogleAnalytics::widget([
'gaId' => 'UA-1234567-01'
])
php composer.phar