Piwik + MediaWiki plugin reports no visitors

(brianwc) #1


Leaving aside the possibility that my site has not been visited by anyone in the last few days since I installed Piwik and the MediaWiki plugin (mainly because I myself have visited without being logged in and so that should have been counted), I’m wondering what theories people might have as to why Piwik + the MediaWiki plugin aren’t producing any statistics.

See for yourself here:

(vipsoft) #2

Besides misnaming it as piwikpiwik.php? style_emoticons/<#EMO_DIR#>/wink.gif


(brianwc) #3

Ahh, thanks. I forgot the trailing slash in $wgPiwikURL which now looks like this:

From my LocalSettings.php

# Attempt at piwik integration
$wgPiwikURL = "http://people.ischool.berkeley.edu/~bcarver/mediawiki/piwik/";
$wgPiwikIDSite = "1";

However, while that fixes the error you found, it appears to introduce a new one: now I’m getting double // here (visible on any page on the site by viewing the source):

<noscript><p>Web analytics <img src="http://people.ischool.berkeley.edu/~bcarver/mediawiki/piwik//piwik.php" style="border:0" alt="piwik"/></p>

I can confirm that when I remove the trailing slash from LocalSettings.php then that img src has just a single “/”. Any thoughts on this?

(vipsoft) #4

If that’s what it takes to fix it…

Don’t forget to send your bug report to the MediaWiki plugin developer. LocalSettings.php isn’t a file in the Piwik distribution.

(isb1009) #5

Brianwc has just contacted me. I’m going to fix the bug and update the code to use the new JavaScript tracking code


(isb1009) #6

I’ve fixed it and updated it for Piwik 0.4.2.


(brianwc) #7

[quote=isb1009 @ Aug 9 2009, 07:49 AM]I’ve fixed it and updated it for Piwik 0.4.2.


Note: When you click on the “download snapshot” link from here:

you are taken to this page:

where you are asked to select a “version” and from all the surrounding text and the options, it is clear they want you to pick your version of MediaWiki, not Piwik or this extension.

However, if you pick 1.14 or 1.15, then it still generates a link to an OLD version of this extension which lacks this fix. The only way I was able to get the latest version of this extension was by telling the Extension Distributor that I was using the Development/Trunk version of MediaWiki, even though I’m not.

Perhaps you can fix this or maybe anyone else with this problem will find this post.

Thanks for this fix, as I now think I’ve got Piwik integrated into MediaWiki successfully.

(isb1009) #8

There’s a way to download the latest version from the “ExtensionDistributor”, choosing the option Development version (trunk), which is the default one.

(brianwc) #9

Exactly. That’s what I was saying. However, most people aren’t using the development / trunk version of MediaWiki, so they will (like me) choose 1.14 or 1.15 and then it will generate a link to an old version of this extension. That’s the problem.