studiobonito / silverstripe-google-analytics
Provide basic Google Analytics integration for SilverStripe CMS.
Installs: 5 495
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 4
Open Issues: 0
Type:silverstripe-module
Requires
- php: >=5.3.0
- silverstripe/cms: >=3.1.2,<4.0
- silverstripe/framework: >=3.1.2,<4.0
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: 4.*
- scrutinizer/ocular: ~1.1
- symfony/class-loader: ~2.3
This package is not auto-updated.
Last update: 2024-11-09 18:01:14 UTC
README
Overview
Provide basic Google Analytics integration for SilverStripe CMS.
Requirements
- SilverStripe CMS 3.1.2 and newer or 3.2 and newer.
Install
Via Composer
$ composer require studiobonito/silverstripe-google-analytics
Manually
Copy the 'silverstripe-google-analytics' folder to the root of your SilverStripe installation.
Usage
The module provides a global template variable $GoogleAnalytics
that can be used to insert the tracking code into any
page template. This global variable uses the tracking ID specified in the CMS in the Setings > Google Analytics
tab.
Google suggests placing tracking code in your document <head>
as in the example below. However this module leaves that
choice to the developer.
<head> <title>Example.com</title> $GoogleAnalytics </head>
Testing
$ phpunit
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email support@studiobonito.co.uk instead of using the issue tracker.
Credits
License
The BSD-2-Clause License. Please see License File for more information.