Skip to content


How to add stat-tracking code to Gallery 3

Gallery is an open source project used to publish, well, picture galleries, obviously. It uses PHP and MySQL. It’s currently in its version 3.0.1. Not that awesome, particularly since version 3 makes some heavy use of Flash… but still the best due to lack of competitors.
Anyway, as I stated in a previous post, I added Piwik to my gallery for stat-tracking from the beginning, and during an update I noticed that I forgot to write down how to do it. So here it is. Note that it works, of course, with any stat-tracker (Google Analytics, Statcounter, etc). If your gallery uses several themes, you’ll have to edit each of them, too. I just use the default, “wind”, so that’s the one we’ll edit:

  • open /themes/wind/views/page.html.php
  • find </body>
  • add the stat-tracking code just before it
  • save and upload

Posted in web development.


One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Daniel says

    Thanks a lot, the module is broken so this is the only option



Some HTML is OK

or, reply to this post via trackback.

Sorry about the CAPTCHA that requires JS. If you really don't want to enable JS and still want to comment, you can send me your comment via e-mail and I'll post it for you.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA