For a SS3 compatible version use version 0.2.
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
composer require wernerkrauss/silverstripe-piwik ^0.4.0
Netwerkstatt\Piwik\Extensions\PiwikExtension: piwik_server: '//logs.example.com/' #domain without protocol an trailing slash piwik_site_id: 123 #the id defined by your piwik install show_on_dev: false #default: don't show in dev mode show_on_test: false #default: don't show in test mode show_on_live: true #default: show in live mode auto_include: true #default: include automatically include_in_backend: false #default: don't include in backend
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:
SilverStripe\SiteConfig\SiteConfig: extensions: - Netwerkstatt\Piwik\Extensions\PiwikSiteConfigExtension
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
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.
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:
Silverstripe\Subsites\Model\Subsite: extensions: - Netwerkstatt\Piwik\Extensions\PiwikSiteConfigExtension
and change your template to reflect the changes:
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem