xini/silverstripe-googleanalytics

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

Adds Google Analytics to the site using Gtag or Google Tag Manager.

Maintainers

Package info

github.com/xini/silverstripe-googleanalytics

Homepage

Type:silverstripe-vendormodule

pkg:composer/xini/silverstripe-googleanalytics

Statistics

Installs: 1 927

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

6.0.0 2026-06-12 03:10 UTC

This package is auto-updated.

Last update: 2026-06-12 03:12:16 UTC


README

Overview

Adds Google Analytics to the site supporting:

  • Global Site Tag (gtag.js)
  • Google Tag Manager (GTM)

The module is derived from Shea's analytics module for multisites and supports single site, multisites and configured-multisites setups.

Requirements

  • Silverstripe 6

Installation

Install the module using composer:

composer require innoweb/silverstripe-googleanalytics dev-master

Add <% include Innoweb/GoogleAnalytics/GoogleAnalyticsHead %> in the head and <% include Innoweb/GoogleAnalytics/GoogleAnalyticsBody %> right after the opening body tag in your main page template.

Then run dev/build.

Usage

All settings can be configured from the CMS.

In your SiteConfig (or the config of your Site when using multisites) you find a tab 'Google Analytics'. Select the analytics type you have setup for your GA account and add the ID. Done.

All GA code only gets inserted in live mode.

License

BSD 3-Clause License, see License