PHPackages                             wernerkrauss/silverstripe-piwik - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wernerkrauss/silverstripe-piwik

ActiveSilverstripe-vendormodule

wernerkrauss/silverstripe-piwik
===============================

Adds piwik tracking code to your site

0.4.0(8y ago)41.2k2[1 PRs](https://github.com/wernerkrauss/silverstripe-piwik/pulls)MITPHP

Since Jan 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/wernerkrauss/silverstripe-piwik)[ Packagist](https://packagist.org/packages/wernerkrauss/silverstripe-piwik)[ RSS](/packages/wernerkrauss-silverstripe-piwik/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (6)Used By (0)

Silverstripe Piwik Analytics Module
===================================

[](#silverstripe-piwik-analytics-module)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/cac34aa0b764b307ef97f044fedc98197a0a0df7ebf0c70b95fe7cf212ffc7a6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7765726e65726b72617573732f73696c7665727374726970652d706977696b2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wernerkrauss/silverstripe-piwik/?branch=master)

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
------------

[](#requirements)

- Silverstripe &gt; 4.0

For a SS3 compatible version use version 0.2.

Installation
------------

[](#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

[](#using-composer)

```
composer require wernerkrauss/silverstripe-piwik ^0.4.0

```

Features
--------

[](#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
-------------

[](#configuration)

```
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
```

Usage with Subsites Module
--------------------------

[](#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:

```
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

```
_paq.push(["setSiteId", "$SiteConfig.PiwikSiteID"]);

```

### Exclude on some controllers

[](#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

[](#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:

```
Silverstripe\Subsites\Model\Subsite:
  extensions:
    - Netwerkstatt\Piwik\Extensions\PiwikSiteConfigExtension
```

and change your template to reflect the changes:

```
_paq.push(["setSiteId", "$SiteConfig.Subsite.PiwikSiteID"]);

```

###  Health Score

30

—

LowBetter than 67% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~247 days

Total

4

Last Release

2987d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff3ee546a6d1b1092f1badf68523ba30f28dec7fce11254a8cb3aeb57c6202de?d=identicon)[wernerkrauss](/maintainers/wernerkrauss)

---

Top Contributors

[![wernerkrauss](https://avatars.githubusercontent.com/u/1043925?v=4)](https://github.com/wernerkrauss "wernerkrauss (16 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (1 commits)")

---

Tags

silverstripeextension

### Embed Badge

![Health badge](/badges/wernerkrauss-silverstripe-piwik/health.svg)

```
[![Health](https://phpackages.com/badges/wernerkrauss-silverstripe-piwik/health.svg)](https://phpackages.com/packages/wernerkrauss-silverstripe-piwik)
```

###  Alternatives

[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)[nightjar/ss-slug

Serve DataObjects as pages through an Action on a relation's Controller without referencing the ID

116.6k2](/packages/nightjar-ss-slug)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
