PHP code example of shineunited / tagmanager
1. Go to this page and download the library: Download shineunited/tagmanager 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/ */
shineunited / tagmanager example snippets
use ShineUnited\TagManager\Silex\TagManagerServiceProvider();
$app->register(new TagManagerServiceProvider(), [
'gtm.options' => [
'id' => 'GTM-XXXX', //gtm container id (
$app['gtm.datalayer']->push([
'event' => 'gtm.eventName',
'eventData' => [
// event data goes here
]
]);
bash
$ curl -sS https://getcomposer.org/installer | php