Download the PHP package typo3/neos-googleanalytics without Composer
On this page you can find all versions of the php package typo3/neos-googleanalytics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download typo3/neos-googleanalytics
More information about typo3/neos-googleanalytics
Files in typo3/neos-googleanalytics
Package neos-googleanalytics
Short Description Google Analytics integration for Neos CMS
License GPL-3.0-or-later
Informations about the package neos-googleanalytics
Neos.GoogleAnalytics
This package allows adding Google Analytics and the Google Tag Manager to a Neos CMS website.
Installation
-
Run the following command f.e. in your site package:
- Update your dependencies by running the following command in your project root folder:
Configuration
Configure tracking
To actually track visits with Google Analytics, some JavaScript with the tracking ID has to be included in the markup. You can do this manually in your template, but the easier way is to set up tracking for each site in the Analytics integration.
Instead of using the Google Analytics tracking code, you can integrate the Google Tag Manager the same way:
Note: If you configure both, a container and an Analytics ID, only the Tag Manager is included.
It is also possible to define default values for all sites. These will be merged with any site specific settings.
Disable tracking
You can disable tracking for a site by either setting the id to false (this is the default value), or leaving it blank.
Additional parameters
If you are using the Google Analytics tracking code, you can also add additional parameters e.g. anonymize_ip set to true.
These parameters are added automatically as JSON to the gtag. The default setting is no parameters.
Rendering the tracking code
By default the tracking code is added to the Neos.Neos:Page prototype automatically. If you want to place it
yourself, disable the automatic inclusion and use the Fusion prototypes directly:
The following Fusion prototypes are available:
Neos.GoogleAnalytics:TrackingCode.GArenders the gtag.js snippet for the configured Analytics ID.Neos.GoogleAnalytics:TrackingCode.GTM.Scriptrenders the Google Tag Manager script snippet.Neos.GoogleAnalytics:TrackingCode.GTM.NoScriptrenders the Google Tag Manager noscript fallback.Neos.GoogleAnalytics:TrackingCode.GTM.DataLayerpushes the givendataontowindow.dataLayer.
The tracking code is never rendered while working in a non-live workspace, e.g. in the Neos backend.
Upgrade instructions
3.x -> 4.0.0
The statistics display inside the Neos backend (inspector "Stats" tab and the "Analytics" administration module) has been removed, because the underlying Google Analytics Reporting API (Universal Analytics) is no longer available. The package now only provides the tracking code integration.
If you referenced any of these in your own configuration, remove those references.
License
See LICENSE