Skip to content

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

License

Notifications You must be signed in to change notification settings

DorsetDigital/silverstripe-simplegtag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

silverstripe-simplegtag

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

Scrutinizer Code Quality Build Status License Version

Requirements

*Silverstripe 4.x

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.