2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-gtm

A simple module that adds google tag manager snippets to silverstripe.

image

gorriecoe/silverstripe-gtm

A simple module that adds google tag manager snippets to silverstripe.

  • Thursday, April 12, 2018
  • by gorriecoe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 43 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 115 % Grown

The README.md

Silverstripe google tag manager

A simple module that adds google tag manager snippets to silverstripe., (*1)

Installation

Composer is the recommended way of installing SilverStripe modules., (*2)

composer require gorriecoe/silverstripe-gtm

Requirements

  • silverstripe/cmframework ^4.0

Maintainers

Config

GTM will check if your .env file has defined GTM_ID first. As follows:, (*3)

GTM_ID="GTM-123456"

If GTM_ID has not been defined you can edit it in your CMS settings., (*4)

Options

Define the tab to insert the gtm field into., (*5)

SilverStripe\SiteConfig\SiteConfig:
  gtm_tab: 'SomeTabName' // Defaults to 'Main'

Usage

Insert $GTMscript after the opening head tag and $GTMnoscript after the opening body tag., (*6)

<!doctype html>
<html class="no-js" lang="en">
<head>
    {$GTMscript}
    ...
</head>
<body>
    {$GTMnoscript}
    ...
</body>
</html>

CSP - Content Security Policy

GTM checks for getNonce() method in the current controller. If its avaiable it will produce a CSP compatible snippet., (*7)

This means GTM is works with Firesphere/csp-headers, (*8)

The Versions

12/04 2018

dev-master

9999999-dev http://github.com/gorriecoe/silverstripe-gtm

A simple module that adds google tag manager snippets to silverstripe.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

google silverstripe tag

12/04 2018

1.0.1

1.0.1.0 http://github.com/gorriecoe/silverstripe-gtm

A simple module that adds google tag manager snippets to silverstripe.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

google silverstripe tag

07/03 2018

1.0.0

1.0.0.0 http://github.com/gorriecoe/silverstripe-gtm

A simple module that adds google tag manager snippets to silverstripe.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

google silverstripe tag