Bug in Piwik Analytics plug-in for WordPress

I’ve been using Piwik ana­lyt­ics soft­ware installed on my server for quite some time, but for couple of months it didn’t record stat­ist­ics for my Word­Press sites, even though I had latest ver­sion of WP (2.9.2), Piwik (0.5.5), and Piwik Ana­lyt­ics plug-in (1.0.1), and, at the same time, it records data fine for my Drupal site.

Turns out, there is a bug in the plug-in con­fig­ur­a­tion inter­face. When you enter the URI of your Piwik install­a­tion into “Host­name of the piwik server” form field, and put in full address with http:// in front of it, plug-in doesn’t recog­nize that, adds its own http://, and sends data to some­thing like http://http/hostname.net. So, for now one should take care to put only the domain name without pro­tocol des­ig­na­tion. To check that your inputs are cor­rect, try using “check out your stats!” link on the bot­tom of the con­fig­ur­a­tion page which should lead you to your Piwik installation.

I’ll write the author about it, though. Plug-in should have a check for the pro­tocol des­ig­na­tion, and strip it before apply­ing its own. And what about Piwik install­a­tions accessed via some other protocol?

Update: In ver­sion 1.0.2 (April 3rd, 2010) Jules updated the explan­a­tion for the form field in ques­tion urging not to put http:// bit in there. It doesn’t fix usab­il­ity issue, but, at least, makes things clearer for a user.

2 Responses to “Bug in Piwik Analytics plug-in for WordPress”


  • Thanks for email­ing me this.

    The bug, as you call it, is actu­ally by design. The form is called ‘host­name’, not ‘pro­tocol + hostname’.

    The design is: use the same pro­tocol as the page the track­ing code is on. So https:// pages are dir­ect­ing to the https:// Piwik install­a­tion. This is done to avoid mixed secure and non-secure con­tent on the same page.

    I under­stand the con­fu­sion, I will doc­u­ment it more clearly and per­haps even acco­mod­ate for the http:// being there (force pro­tocol to be http://).

    Regards, Jules (the plug-in author).

  • I under­stand where you are com­ing from. How­ever, for one, it is just con­fus­ing, and, as you said, needs to be bet­ter doc­u­mented (although, after actu­ally pay­ing atten­tion to the instruc­tions and an example, I got it figured out).

    Secondly, as I said in my post, even if you want to force cer­tain fea­ture, it should be done behind the scenes, without leav­ing user guess­ing. Same reason why, accord­ing to good inter­face design, it shouldn’t mat­ter to soft­ware how user enters, say, phone num­ber: as #######, ###-####, or ### ## ## — soft­ware should recog­nize and strip unne­ces­sary char­achters, and then out­put it in one par­tic­u­lar and con­sist­ent format regard­less of user input.

    Thirdly, I don’t think enfor­cing a pro­tocol is such a good idea. User might have Piwik installed at the http:// web­site, but access it from, as you’ve said, https:// web­site or whatnot.

    I will doc­u­ment it more clearly and per­haps even accom­mod­ate for the http:// being there (force pro­tocol to be http://).

    Maybe expli­citly put http:// right in front of the host­name form field, or let user choose pro­tocol of install­a­tion (drop­down or tick box).

Leave a Reply




Bad Behavior has blocked 1020 access attempts in the last 7 days.