Piwik Analytics WordPress Plugin

Please download the plugin (now at version 1.0.2) from the wordpress.org plugin directory

This is a basic wordpress plugin for the excellent Piwik web Analytics tool. It adds the piwik javascript code into every page of your weblog, so you don’t have to code PHP to add it to your templates.

Please note you will have to have access to a working Piwik installation for this to work.

It is based quite heavily on the Google Analytics wordpress plugin by Joost de Valk.

The following options are supported:

  • hostname and path to Piwik options
  • site ID
  • option to control download tracking
  • option to exclude the admin user (probably you)

Your feedback is important. Please test it for me, report bugs, and leave feedback in the comments so I can improve this software.

I will update this post whenever there is any news.


Jules Stuifbergen is webanalist met een voorliefde voor online marketing, usability, psychologie en techniek, en tevens eigenaar van deze site. Hij helpt je graag verder online. Nodig hem eens uit voor een kop koffie! Mocht je dit blog interessant vinden, abonneer dan op de RSS feed of nieuwsbrief.

64 reacties op “Piwik Analytics WordPress Plugin”

  1. Flandal 13 maart 2010 op 17:57 #

    Installed plugin in wordpress 2.9.2, I’ve added only a little call to and it worked perfectly.

  2. Dd 28 maart 2010 op 00:42 #

    Can you use the Changelog tab ? (in the plugin presentation)

  3. Matt Katz 30 maart 2010 op 20:07 #

    Just wanted to say thanks for the plugin! It’s great, works fine.

  4. Amboss 2 april 2010 op 01:20 #

    Latest version of WP an Plugin version 1.1…no problems here.
    Thanks for your work!

  5. Jules 3 april 2010 op 10:43 #

    Version 1.0.2 is out. No functional changes.

    * small helptext change
    * added a changelog

  6. william 20 april 2010 op 20:21 #

    will geo ip plugin work with this?

    • Jules 20 april 2010 op 20:30 #

      It’ll work with any Piwik plugin that use the standard Piwik.js tracking code.

  7. David 12 mei 2010 op 04:13 #

    I have installed this on a xampp server using local host. Piwik works fine as the plugin for zen photo works, however, I am not getting any stats for the wordpress blog. Any suggestions?

  8. Adrian 22 mei 2010 op 13:01 #

    great plugin, thanks.


  9. Another Adrian 25 mei 2010 op 18:16 #

    I have a request-or rather a feature I’d love to see. Is there a way that a site id in Piwik could be tied to Author id. In this case, in a multi-blog situation, the author would see the stats only for his or her posts–assuming the posts were tagged. I would also like to share info in a page on the blog a logged in author could access when logged in.

    • Jules 28 mei 2010 op 13:59 #

      Regarding your first question:
      If you can map each WP author ID to a piwik site ID, you can use something like this in your theme’s functions.php.

      See http://pastebin.com/0S3qMtbH

      – map the WP author ID to piwik site ID using an array
      – Use the correct site id in the javascript

      NB: don’t activate the piwik analytics plugin if you use this!

  10. Aaqil Mahmood 31 juli 2010 op 05:30 #

    Installation is not easy, with no guide. I mean plugin configuration.

    • Jules 25 augustus 2010 op 21:13 #

      Next release, I’ll improve the docs, and perhaps includie a video tutorial.

  11. Sir Blundrig 10 augustus 2010 op 04:52 #

    Any chance of a version that works with WordPress 3.0.1?

    • Jules 25 augustus 2010 op 21:11 #

      Just found some time to check my test blog, and I see the tag on the page, and traffic coming in on my piwik installation.

      WordPress version: 3.0.1
      Piwik version: 0.9

  12. Machote [uy] 23 augustus 2010 op 15:28 #

    I’m using WordPress v3.0.1 and it doesn’t work. I’ve configured it since it’s very simple but nothing happened :-(
    I had to place the script myself directly into the theme to make it work.

    I hope you can update the plug-in ‘cos it seems to be very useful.



    • Jules 25 augustus 2010 op 19:07 #

      Mh.. sorry it didn’t work for you. Thanks for leaving a comment, though!

      Right now, I’m pretty busy doing paid work. After those projects are done, I will update my plugin.

  13. Ingo 1 september 2010 op 13:27 #

    Hey – thanks for the plugin; in my case it does not work, because the piwik is installed on an external server and I have to talk to the server with “https” and your plug in allows only “http” :(

    • Jules 1 september 2010 op 13:32 #

      That’s correct, it always uses the same protocol as the page itself.

      Another one for my todo list.

  14. Magnus 3 september 2010 op 10:16 #

    Hi — the noscript part of the piwik snippet is missing, e.g.:

  15. Christian Brix 13 september 2010 op 14:28 #

    Looks like a great plugin!

    I have one questions before I “dare” start playing with it: Does it work along side cache plguins, like WP (Super) Cache and so on?


    • Jules 14 september 2010 op 14:50 #

      Yep, it should work without a problem.

      Since all the script code is the same on every page, caching will make the script load faster, not differently.

  16. Matt 28 september 2010 op 15:12 #

    My blog is at abc.com/blog, but my piwik account (which monitors multiple websites) is at def.com/piwik. How do I configure the “Base URL path of piwik installation” to get this to work?

    • Jules 29 september 2010 op 19:06 #

      The hostname is def.com.
      The base URL path /piwik/

      Here’s the screenshot:

  17. Sjors 21 oktober 2010 op 19:24 #

    Does this work on wp 3.0? I couldn’t get it working for that version.. here’s the post: http://wordpress.org/support/topic/plugin-piwik-analytics-cant-get-it-working-with-wordpress-301-302?replies=1

    Any help would be greatly appreciated.

    • Jules 25 oktober 2010 op 20:55 #

      I replied to the support thread. Basically, I need more information, like the url of your site, your settings, the generated output (if any).


  18. Kimmy 12 november 2010 op 15:56 #

    De plugin werkt goed, maar in de orginele code wordt er een img tag geplaatst voor bezoekers die JS uit hebben staan.
    Kan ik die op de een of andere manier nog toevoegen?

    • Jules 12 november 2010 op 16:58 #

      Niet zonder de plugin code te wijzigen :-)

      Ik ben bezig met een betere versie van de plugin, ik zal dit meenemen.
      Nieuwe release komt eind dit jaar, of in januari. Even wat tijd vinden.

      Bedankt voor je reactie!

      • Kimmy 9 december 2010 op 09:38 #

        Is er misschien een mogelijkheid dat ik die img tag er zelf tijdelijk in zet?
        Kan geen code schrijven maar het lijkt mij nou niet echt een groot probleem.

        Wil je niet pushen hoor, maar mis de stats van sommige bots op dit moment

  19. Guus 8 december 2010 op 15:22 #

    Heel er bedankt!

  20. Mehmet 10 december 2010 op 22:28 #

    Thanks your article. nice.

    • Forever 17 mei 2016 op 00:09 #

      Never would have thunk I would find this so ineespinsabld.

  21. lead 17 februari 2011 op 17:48 #

    Great plugin, however in these times of google ranking fast sites higher than slower sites, is there any chance of updating the plugin to support the more user responsive asynchronous tracking recently introduced into piwik?

    • Jules 18 februari 2011 op 08:03 #

      Yes, good things are happening in the Piwik development.

      Asynchronous tracking is definitely coming in a new version of my plugin.

  22. Gerhardt 2 maart 2011 op 09:29 #

    Hi Jules,

    i have installed the plugin for an private project on “localhost” and it works great.
    I will try to put in online.

    Best regards from Rogarema Netherlands

  23. Webdesign Flensburg 18 juli 2011 op 12:33 #

    Many thanks for this WP-Plugin

  24. Tom Chuong 20 september 2011 op 18:31 #

    I tried to change the admin password, and the “uploading data” is running or looping indefinitely. Basically, I can NOT change the admin password. Please advise. Thanks!

  25. Thea Haak 21 september 2011 op 09:24 #

    I installed the plugin, but have a issue to get it working.
    the version of wordpress is 3.21 nl
    i noticed that the map piwik is nog created, do i have to do that manually?
    The id, were can i find this?


  26. Jonah Bron 8 oktober 2011 op 18:39 #

    Awesome plugin, man! Simple and elegant. One note: if you try it out and it appears that it’s not tracking hits, you probably need to logout because by default Admins aren’t tracked. That is mentioned in the F.A.Q.s, but I thought I’d put it here too.

  27. Danny 25 oktober 2011 op 10:39 #


    I have a empty list of keywords, how can I check if the plugin works on that point?

    Thanks Danny

  28. Philipp 1 november 2011 op 10:06 #

    Much like Adrian, I would really like to see a feature that tracks the logged in user. Maybe through Piwiks custom variables, so that you could either save the user group or user id in a custom variable.

  29. Dunedan 9 december 2011 op 23:16 #

    I really like your Piwik plugin, but I miss the feature to disable tracking not only for admins, but for other roles like authors too.
    Could you please add that feature?

  30. Richie 22 december 2011 op 11:56 #

    wp Plugin installed and Piwik installed too but getting no data reading at all – any ideas?

    • Jules 22 december 2011 op 12:22 #

      When I visit your site, I see the tracking code, a correct piwik installation, and I see the tracking pixel sent.
      Everythink looks OK. Are you looking at the correct date (today?).

      Here’s the pixel I see leaving my browser:
      GET /piwik/piwik.php?action_name=Chillax%20%7C%20Time%20to%20Chill&idsite=1&rec=1&r=806690&h=12&m=18&s=54&url=http%3A%2F%2Fwww.timetochill.me%2F&_id=da3f9e33597992b9&_idts=1324552734&_idvc=1&_idn=1&_refts=0&_viewts=1324552734&pdf=0&qt=1&realp=0&wma=0&dir=0&fla=1&java=1&gears=0&ag=1&res=1280×800&cookie=1

  31. Barry 17 mei 2012 op 06:54 #

    Hi, I just can’t figure out what to put in WP account settings in wordpress. it is Asking about. i have latest WP-Piwik version.

    Piwik URL:
    Auth Token:

    and i don’t know where to find it, and i don’t know where to access,Piwik :(
    Please help

    Thank you !

  32. Neil Gee 16 september 2012 op 07:56 #

    Hi Jules – when i search for your plugin in Dashboard>Install Plugins for just the keyword “Piwik” it doesn’t show I have to type in “Piwik Analytics” – I would imagine you’ll get more of a user base if you can target it just for “Piwik”

    Anyway it works for me just fine.


  33. Guini 17 september 2012 op 14:33 #

    I’m missing a guide through the WordPress-Piwik-Statistics. For example: what do the colors (red and blue graphs) in the statistics of the visitors over the last 30 days mean? There is no explanation anywhere!

  34. مصطفی 10 maart 2014 op 16:49 #

    سلام.دعوت میکنم به این سایت بیاین:freeniaz.ir/buy

  35. marcus 12 maart 2014 op 16:45 #

    Do you plan a new version with a simple option to usw opt-out?
    Best regards

  36. Ajay 10 november 2015 op 23:34 #

    I personally think it is beacuse there are tons of subscription plugins that allow you to have a signup option and then you can send email back out to them too if you want. You can also use any of the paypal type plugins to charge for premium content if you want and only those who pay will get to see it. WordPress is very, very flexible when it comes to building some type of community. I wouldn’t worry about it being hacked as long as you keep it up to date. I would install it on your server as well, you couldn’t use all those plugins if WordPress hosts it.

  37. Ben 2 januari 2016 op 00:35 #

    would be nice to have an option to change the script name.

Genoemd in andere artikelen

  1. The Software Vault » Piwik 0.7 kommt mit neuem Design - 29 juli 2010

    […] Software zu installieren. Für Worpdress gibt es dafür natürlich auch zahlreiche Plugins. Z.B. Piwik Analytics. Das neue Worldmap Widget KategorienInternet, Software Tags: Analytics, Open Source, real-time […]

  2. Michelle | Imho - 18 augustus 2010

    […] Piwik Analytics (freie Alternative zu Google Analytics, die auf dem eigenen Server läuft) […]

  3. Blog, Portfolio, Infos, … | Imho - 18 augustus 2010

    […] Piwik Analytics (freie Alternative zu Google Analytics, die auf dem eigenen Server läuft) […]

  4. Intégrer Piwik dans Wordpress sans modifier les templates. | Thierry Schoutheer's Virtual Home - 27 augustus 2010

    […] Piwik Analytics, téléchargeable ici chez WordPress, vous permet de lier Piwik et Worpress juste en paramétrant le numéro du site, le chemin jusqu’à Piwik ou le site d’hébergement s’il est externalisé, sans modifier une seule ligne de code ! […]

  5. 8 Great Plugins To Track WordPress Stats - 11 december 2010

    […] Piwik Analytics WordPress Plugin : It adds the piwik javascript code into every page of your weblog, so you don’t have to code PHP […]

  6. Piwik Analytics Configuration « der Lerigau - 26 januari 2011

    […] “Piwik” gesucht und es wurden auch einige gefunden. Entschieden habe ich mich dann für Piwik Analytics, da dieses so aussah, als wenn es genau das macht, was ich will. Und das war auch der Punkt, an dem […]

  7. Open Web Analytics unter WordPress » Analytics, Piwik, Open, Plugin, Integration, WordPress » Chrische.de - 22 februari 2011

    […] habe ich das unter der GPL stehende “Piwik Analytics” WordPress-Plugin adaptiert und auf die Verwendung mit Open Web Analytics angepasst. Kudos an […]

  8. 8 Great Plugins To Track WordPress Stats | DevsTopTen.com - 23 april 2011

    […] Piwik Analytics WordPress Plugin : It adds the piwik javascript code into every page of your weblog, so you don’t have to code PHP […]

  9. Webanalytik mit Piwik at ferdinand-keil.de - 19 juni 2011

    […] id« und einen Javascript Tracker Code. Wenn man WordPress verwendet reicht die Id aus. Das Plugin Piwik Analytics nimmt die Id entgegen und kümmert sich um den Rest. Es gibt auch für diverse andere CMS und Blogs […]

  10. Jérémy Posé » Plugins WP - 28 juni 2011

    […] http://forwardslash.nl/piwik-analytics/ […]

  11. Hello Piwik, goodbye Google Analytics | Whaly's World - 20 februari 2012

    […] wordpress install the "Piwik Analytics" […]

  12. Intégrer Piwik dans Wordpress sans modifier les templates. | Schout's HomeWork - 21 juni 2013

    […] Piwik Analytics, téléchargeable ici chez WordPress, vous permet de lier Piwik et Worpress juste en paramétrant le numéro du site, le chemin jusqu’à Piwik ou le site d’hébergement s’il est externalisé, sans modifier une seule ligne de code ! […]