DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:piwik

piwik plugin

Compatible with DokuWiki

2011-11-10

plugin Plugin for Piwik - Open source web analytics / a replacement for Google Analytics

Last updated on
2012-01-27
Provides
Admin
Repository
Source
Conflicts with
piwik2

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to googleanalytics

Tagged with statistics

Gitorious (service stopped): https://gitorious.org/dokuwiki-piwik/dokuwiki-piwik/
GitLab (replacement): https://gitlab.com/dokuwiki-piwik/dokuwiki-piwik/tree/master

Piwik plugin for DokuWiki. Piwik is an open source web analytics software that aims to be a replacement for Google Analytics. This plugin allows you to track visitors statistics of your DokuWiki installation using Piwik. Optionally admin/users can be excluded from the statistics.

See https://gitorious.org/dokuwiki-piwik/pages/Home for installation instructions.

Installation

$ cd dokuwiki/lib/plugins/
$ git clone https://git.gitorious.org/dokuwiki-piwik/dokuwiki-piwik.git piwik

Alternatively, you can also download a tarball via gitorious (first time clicking is generating the package):
https://gitorious.org/dokuwiki-piwik/dokuwiki-piwik/archive-tarball/master

Configuration

  1. Go to Plugin Management and make sure “piwik” is enabled
  2. Open Configuration Manager –> Plugin Settings –> Piwik Plugin Settings and set the values
  3. Piwik plugin should now be enabled.

Discussion

In my opinion I got my DokuWiki/Piwik system working easier without this plugin. This is because you need to edit the appearance template's main.php anyway, you can use the code (or snippet) provided by your Piwik-service.

Comment from author 2012-01-28

It is not longer necessary to do manual work to modify templates. Piwik plugin now uses TPL_METAHEADER_OUTPUT hook to insert the piwik tracker code. The new version is also backwards compatible.

System requirements

  1. MySql Server installed and root login enabled in MySQL Server.
  2. PHP set up for MySql -connection1).
  3. Empty Database for Piwik created (you need this when installing Piwik).
  4. Piwik installed to a existing web site (can be also subfolder).

Ciove 2008/07/14

actual code is friendlier than image

Don't know why but the code to insert is shown on the plugin page as an image which is not easy to copy/paste, so here it is:

<?php
if (file_exists(DOKU_PLUGIN.'piwik/code.php')) {
  include_once(DOKU_PLUGIN.'piwik/code.php');
  piwik_code();
}
?>

Tracking code in head section

The Piwik tracking code is inserted in the head section of the html. I think it is usually inserted at the end of the body part. Especially the img tag doesn't make much sense there:

<noscript><p><img src="http://https://my.stats.com/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript>

…particularly with the “http://https://

EDIT: The "http://https://" was caused because I entered the "https://" as part of the url. Doesn't seem to be supported.


1)
PECL extension installed and enabled
plugin/piwik.txt · Last modified: 2016-07-31 17:38 by Klap-in