Download the PHP package xynnn/google-tag-manager-bundle without Composer
On this page you can find all versions of the php package xynnn/google-tag-manager-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xynnn/google-tag-manager-bundle
More information about xynnn/google-tag-manager-bundle
Files in xynnn/google-tag-manager-bundle
Package google-tag-manager-bundle
Short Description Google Tag Manager Bundle for Symfony
License LGPL-3.0-only
Homepage https://github.com/xyNNN/GoogleTagManagerBundle
Informations about the package google-tag-manager-bundle
GoogleTagManagerBundle
The GoogleTagManagerBundle provides you an easy-to-use method to integrate the Google Tag Manager into your Symfony 2 application.
Note: This Bundle is still in development. Feel free to report encountered issues!
Requirements
2.x
- [x] PHP 5.3 and higher
- [x] Symfony 2.8 and higher
3.x
- [x] PHP 5.6 and higher
- [x] Symfony 2.8 and higher
Install
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
2.x
3.x
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding the following line in the app/AppKernel.php
file of your project:
Step 3: Enable Google Tag Manager
Add the configuration to your yaml file. Please don't forget to adjust your Google Tag Manager Id.
Step 4: Insert the ViewHelper
Insert the ViewHelper into your layout file to enable the Google Tag Manager. Please be aware to insert into right after the HTML body tag!
And right after the HTML head tag:
And right before the closing BODY tag:
Or use the autoAppend
setting to let a kernel reponse listener add them to your layout automatically.
Additional instructions: https://developers.google.com/tag-manager/quickstart
Step 5: Fill up the DataLayer from Google Tag Manager (Optional)
If you want to send some information to the Google Tag Manager, you can use the dataLayer.
And if you want to add pushes at the end of the body (not in initial dataLayer):
Configuration
An optional paramater called additionalParamaters
allows specifying URL parameters to add on to the tag manager URLs. This can be used to support custom environments in tag manager.
Authors
Philipp Bräutigam
... and Contributors!
License
Copyright (c) 2017 Philipp Bräutigam This repository is released under the GNU LGPL v3.0 license.
All versions of google-tag-manager-bundle with dependencies
symfony/dependency-injection Version ^6.4||^7
symfony/http-kernel Version ^6.4||^7
symfony/config Version ^6.4||^7
symfony/templating Version ^6.4||^7
twig/twig Version ^2.0||^3.0
symfony/yaml Version ^6.4||^7