cvette/google-tag-manager

This package is abandoned and no longer maintained. The author suggests using the neos/neos-googleanalytics package instead.

This package includes a Fusion prototype, as well as a node type mixin for simple integration of the Google Tag Manager container code into your Neos CMS project.

Installs: 13 110

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 1

Forks: 2

Open Issues: 0

Language:HTML

Type:neos-plugin

v3.1 2018-10-17 08:56 UTC

This package is not auto-updated.

Last update: 2019-09-30 16:35:33 UTC


README

Latest Stable Version Total Downloads License

Google Tag Manager Neos Plugin

This package includes Fusion prototypes, as well as a node type mixin for simple integration of the Google Tag Manager container code into your Neos CMS project.

Usage

The following Fusion snippet adds the container script directly after the opening head tag and the fallback code directly after the body tag of your pages. By default the container is only included in Production context and the frontend.

tagManagerScript = Vette.GoogleTagManager:ContainerScript {
	@position = 'before head'
}

tagManagerNoScript = Vette.GoogleTagManager:ContainerNoScript {
	@position = 'before body'
}

The default Fusion code gets the container ID from a property 'containerId' of the site node. You can use the ContainerMixin to add the property to your site node.

Your.Package:Site:
    superTypes:
        Vette.GoogleTagManager:ContainerMixin: TRUE

Getting the container ID from settings

By overwriting the ContainerBase prototype you can get the container ID from settings or any other EEL expression.

prototype(Vette.GoogleTagManager:ContainerBase) {
    containerId = ${Configuration.setting('Your.Package.containerId')}
}      ...

License

The GNU General Public License Version 3 (GPLv3). Please see LICENSE for more information.