dorsetdigital/silverstripe-simplegtag

Simple method of adding GTM tags

Installs: 582

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

pkg:composer/dorsetdigital/silverstripe-simplegtag

v3.0.0 2025-10-10 14:22 UTC

This package is auto-updated.

Last update: 2025-10-10 14:23:01 UTC


README

A very simple way to add Google Tags to a site for analytics, adwords, etc.

Scrutinizer Code Quality Build Status License Version

Requirements

*Silverstripe 6.x (for CMS 4/5, please use the 2.x release)

Installation

  • Install the code with composer require dorsetdigital/silverstripe-simplegtag
  • Run a dev/build?flush to update your project

Usage

This module injects the required code for Google Tag Manager into your pages. Once installed, set your GTM ID in the site config.

The module injects code into the html <head> and the <noscript> snippet into the page at the start of the <body>

Consent

If you are using the cookie consent module (https://github.com/TheBnl/silverstripe-cookie-consent) then this module will only add the GTM tags if a user has accepted analytics cookies.