2017 © Pedro Peláez
 

silverstripe-vendormodule multisites-googleanalytics

Adds Google Analytics tracking code to each multisite

image

sheadawson/multisites-googleanalytics

Adds Google Analytics tracking code to each multisite

  • Thursday, February 22, 2018
  • by sheadawson
  • Repository
  • 3 Watchers
  • 2 Stars
  • 3,327 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 6 Forks
  • 3 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

silverstripe-multisites-googleanalytics

Adds Google Analytics tracking code to each multisite, (*1)

Requirements

  • SilverStripe 4
  • Multisites

Usage

The default behaviour inserts the tracking code automatically in the page head., (*2)

The code only gets inserted in live mode., (*3)

Using a template for the tracking code

If you want to use the template version of the tracking code (i.e. if you need to modify the tracking code for your project/theme) add the following YAML:, (*4)

MultisiteAnalyticsControllerExtension
  use_template: true

Use <% include GoogleAnalytics %> in your layout template to insert the tracking code., (*5)

Copy the template multisites-googleanalytics/templates/Includes/GoogleAnalytics.ss to your theme to make changes to the tracking code., (*6)

Download tracking with custom controller urls (i.e. DMS module)

In order to track downloads that use a controller url instead of the direct file link (i.e. DMS module), please add the following attributes to the links:, (*7)

class="download" data-extension="$Extension" data-filename="$FilenameWithoutID"

This will trigger the event tracking script to record the clicks., (*8)

The Versions

22/02 2018

dev-master

9999999-dev

Adds Google Analytics tracking code to each multisite

  Sources   Download

The Requires

 

by Shea Dawson

analytics silverstripe multisites