chameleon-system/google-tag-manager-bundle
Adds google tag manager tracker
README
Bundle adds the base implementation to track data to Google Tag Manager.
Setup
Follow this step by step guide to set up GoogleTagManagerBundle.
Prerequisites
Bundle requires a Google account and a GoogleTagManager account. Sign in at https://tagmanager.google.com to create a GoogleTagManager account. Within this account you can add different tracking tags, for example for GoogleAnalytics or Bing.
Install Bundle
In the projects composer.json, require chameleon-system/google-tag-manager-bundle in the version that matches the Chameleon
version used and run composer update.
Add ChameleonSystem\GoogleTagManagerBundle\ChameleonSystemGoogleTagManagerBundle() to the AppKernel.
Run CMS updates.
Configuration
Insert your GoogleTagManager Container-ID to external tracker "Google Tag Manager" and activate it. For each page in the CMS you can define a special page type which was sent as value for the variable 'pageType'. You can see all possible values in the field "description" in the CMS.
Add/Modify Tracking Data
If you want to add or modify the tracking data sent to GoogleTagManager, you have to tag your mapper service with the tag 'chameleon_system_google_tag_manager_bundle.google_tag_manager_mapper'.
Tracked Data
The default implementation sends the following data to GoogleTagManager
- language
- pageType
- pageName
- event
- events
- Login, Registration
- eventCategory
- eventAction
- eventLabel