Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!


Piwik Statistics Plugin

This plugin will enable your trac environment to be logged by Piwik. It is mostly based on the excellent TracGoogleAnalytics.


You need at least Piwik 0.4 and Trac 0.11

Download and Install

The easiest way to install is using EasyInstall:

sudo easy_install TracPiwik

To enable the plugin add this to the [components] section in your trac.ini:

tracext.piwik.* = enabled


Mandatory Configuration

  • Site ID: Piwik's Site ID. You can find the Site ID either on the Site tab in Piwik's settings module or in the JavaScript code:

    var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);

    In this example, the Site ID is 1.

  • Base URL: The base URL of your Piwik installation. If the URL of your Piwik installation would be, you'd enter (without http:// and the trailing slash).

Advanced Configuration

  • admin_logging: Disabling this option will prevent all logged in TRAC_ADMIN's from showing up on your Piwik reports.
  • authenticated_logging: Disabling this option will prevent all authenticated users from showing up on your Piwik reports.
  • extensions: Enter any extensions of files you would like to be tracked as a download. For example to track all MP3s and PDFs enter mp3|pdf. Outbound link tracking must be enabled for downloads to be tracked.

Source Code

If you wish to be on the bleeding edge and get the latest available code:

hg clone

Bugs and/or New Features

Please submit bugs or feature requests to:

Recent activity

Nothing to see here, move along.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.