Google Tag Manager Module for SilverStripe

Installs: 866

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 0


2.0.4 2021-02-04 17:39 UTC

This package is auto-updated.

Last update: 2021-09-04 19:05:46 UTC


SilverStripe module to add Google Tag Manager code to all pages of a website.


Download, clone or install from packagist (todo) into your Silverstripe root. Visit

What does it do?

The module will output the following code to <head>...

<!-- Google Tag Manager -->
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->

... and the following code just after <body>

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src=""
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

GTM-XXXX will be replace by a ContainerID which can be configured in Site Settings > Google Tag Manager


  • Add support for passing in data layers