This extension allows to easily set up the required Google Tag Manager script by creating a Google Tag Manager setting and linking it to a channel.
The Templates found in the module gtm-template
are used to render the script tag.
- From the project's root folder, clone this repository as a submodule of the extensions folder. Make sure to use the branch name that matches your workspace version.
git submodule add https://github.com/coremedia-contributions/google-tag-manager.git
- Use the extension tool in the root folder of the project to link the modules to your workspace.
mvn -f workspace-configuration/extensions com.coremedia.maven:extensions-maven-plugin:LATEST:sync -Denable=google-tag-manager