Download the PHP package wernerkrauss/silverstripe-piwik without Composer
On this page you can find all versions of the php package wernerkrauss/silverstripe-piwik. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wernerkrauss/silverstripe-piwik
More information about wernerkrauss/silverstripe-piwik
Files in wernerkrauss/silverstripe-piwik
Package silverstripe-piwik
Short Description Adds piwik tracking code to your site
License MIT
Informations about the package silverstripe-piwik
Silverstripe Piwik Analytics Module
This module includes a piwik analytics javascript at the bottom of your page.
It's configurable via config API, you can change the included Javascript by overwriting the Piwik.ss template.
Requirements
- Silverstripe > 4.0
For a SS3 compatible version use version 0.2.
Installation
Best installed via composer. You may clone the repo or download the zip, however you should find a directory called "silverstripe-piwik"
with all files in vendor/wernerkrauss/
using Composer
Features
- Includes piwik tracking code to your page. You can configure if it's included automatically or manually by calling $Piwik inside your template
- By default only included in frontend pages
- By default only included in Live mode
Configuration
Usage with Subsites Module
When you're using subsites you can add the PIWIK Site ID for each subsite / domain in SiteConfig. To do this you have to add an extension:
You'll also have to tweak the used template for the tracking code. Copy the default Piwik.ss
file to your theme's /templates/ folder
or to /mysite/templates/ and adjust the setting like
Exclude on some controllers
You can finetune the controllers Piwik should NOT be included using the PiwikExtension.excluded_controllers
config var.
By default the module is disabled on dev/build.
Usage with Subsites and Translatable
When you're useing Subsites with translatable you have to be sure to add it to the SiteConfig for every translation. One workaround might be if don't put the value fot the Piwik SiteID to SiteConfig, but directly to the Subsites DataObject.
Then don't extend SiteConfig but Subsite:
and change your template to reflect the changes: