PHP code example of tomlutzenberger / yii2-googletagmanager
1. Go to this page and download the library: Download tomlutzenberger/yii2-googletagmanager 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-googletagmanager example snippets
<?= \TomLutzenberger\GoogleTagManager\GoogleTagManager::widget()
return [
// ...
'gtmId' => YII_ENV_PROD ? 'GTM-ASDF123' : '',
];
<?= \TomLutzenberger\GoogleTagManager\GoogleTagManager::widget([
'gtmId' => 'GTM-ASDF123'
])
php composer.phar