Inane Coding Go on, slap that wayward code


OC 2.x compatibility on its way – Piwik OpenCart Ecommerce Mod

OC 2.x support is on its way!

OpenCart was released on October 1, 2014 and made several changes to the way OpenCart and mods interact. This means mods for OC 2.x and those for the earlier OC 1.5.x aren't compatible. Shortly we will be releasing a new version of the mod which is compatible with the latest OC 2.x release - don't worry though, we'll keep offering the 1.5.x version of the mod for those that want it!

This is thanks to a brilliant contribution by Opensource Experts / Jozef Popiel who has coded and tested the modifications necessary for OC 2.x - his code is pending my merge into this mod & final testing before I release a new version. There's no timescale yet, but it should be shortly. If you can't wait and want to try it out before the finishing touches are done, you can see the code at

I'll post again once the next version is released. Happy new year all :)



v1.1 Release of Piwik OpenCart Ecommerce VQmod

Version 1.1 of my Piwik OpenCart Ecommerce VQmod has just been released. This fixes some bugs, and I've tested compatibility with OpenCart


This is now available to download. Remember to check out the mods github page.

v1.1 - 2014/06/25
Fix error messages for undefined variables; checks GET values & other elements are set .
Fixed 'mod disabled' footer comment so not included in visible HTML (thanks github / glennw!).
Fixed minor error in Readme Install HTTP/HTTPS instructions.

As with the last release, the mod is now up on the extension store.

As always please let me know your feedback!

If you do use this mod please consider donating. Thanks!



v1.0 Release of Piwik OpenCart Ecommerce VQmod

Version 1.0 of my Piwik OpenCart Ecommerce VQmod has just been released. This fixes some bugs, adds the piwik search tracking feature (including counting the number of hits and giving a valuable report on the hits with zero results) and lots of other good stuff. Enjoy!

This is now available to download. Remember to check out the mods github page.

v1.0 - 2014/02/17
First version to be listed on extension store (jump to v1.0).
Order tracking now called from success page (fixes issue with order attributed to payment processor).
Global enable/disable setting on admin page now implemented.
New search tracking feature!
Added checks; avoids some common admin settings errors and improves uninstall.
Other minor changes (see github for full commit list).

I will be listing this version of the mod on the extension store in the coming days :) As always please let me know your feedback!

2Jan/140 chooses InaneCoding ECommerce Opencart mod!

I'm honoured that my Piwik Opencart Ecommerce mod has now been linked from the official site as the mod of choice for integrating Piwik with Opencart. :))

Developments are underway for the next release, albeit slowly! I've been working on some bug fixes, improvements to the admin interface, and a new feature to add search tracking to the mod.


v0.4 Release of Piwik OpenCart Ecommerce VQmod

Version 0.4 of my Piwik OpenCart Ecommerce VQmod has just been finished. "WOOOO". This fixes a bug, adds a new feature, and also a small enhancement for those using custom themes. Enjoy!

This is now available to download. Remember to check out the mods github page.

v0.4 - 2013/09/16
Fixed bug 'HTTP_REFERRER' undefined index error.
Added option to use Piwik Proxy Hide Url script to obfuscate the URL in the javascript code.
Modified VQmod XML file so will now play nicely with custom themes.



Using Piwik OpenCart eCommerce mod with Mijoshop

EDIT 2014-09-07: Another user has commented on a post of mine to say they've forked the mod for use with Mijoshop. I haven't tested this myself but it seems to be ready-to-go and probably better than the advice given below (e.g. it seems you need a finishing /div in piwik.xml not a /body as I wrote below). Please let me know your experience with Mijoshop in the comments. My original post is given below for reference.

We also forked this on GitHub and modified it for MijoShop, which is a Joomla extension that ports OpenCart into the Joomla CMS. Hope it helps others, you can find it here:


I recently got a query from Chris Flanagan at Siteease about using my Piwik Opencart eCommerce VQmod with Mijoshop (3rd party shopping cart software based on OpenCart). It seemed an interesting problem so I dived in....

After much too-ing and fro-ing we got it to work - So Im here to pass on the knowledge to anyone who may want a Mijoshop Piwik Ecommerce analytics mod. Mid-way through Chris wrote a blog post with lots of useful info -  - however this is now slightly out of date, but he has pinky promised to write a follow-up! P.S. Dont follow the advice to manually insert the tracking code into the bottom of the page, this was just a mid-diagnosis quick-fix. Once the mod is working correctly it will insert the tracking code itself.

The end result is that you need to modify the 'piwik.xml' file that comes as part of my Piwik Opencart eCommerce VQmod. The modification is very simple and just requires you to replace the following on line 19;

<search position="before" offset="1"><![CDATA[</body>]]></search>


<search position="bottom" offset="1"><![CDATA[</body>]]></search>

This makes sure the javascript code which is dynamically generated by my mod is correctly inserted into the Mijoshop footer. As Mijoshop has a slightly different footer template file this VQmod search term needs this minor modification.

Thats all there is to it!




First general release – Piwik OpenCart Ecommerce VQmod v0.3

Version 0.3 of my Piwik OpenCart Ecommerce VQmod has just been finished, hurrah!!

This is the first general release and is now available to download. The mod also now has its own github page.

v0.3 - 2013/05/28
First release of admin backend feature.
Arranged source files in an opencart folder structure for easy uploading.
PiwikTracker.php file now included for easier install.


Piwik OpenCart Ecommerce VQmod v0.2

Version 0.2 of my Piwik OpenCart Ecommerce VQmod has just been finished. As before this is a pre-release version with limited functionality and still requires testing. If you would like to trial it and give me feedback then please get in touch!

v0.2 - 2012/11/04
Fixed bug where the ecommerce action would sometimes not get attributed to the correct visitorID.
Improved Installation Instructions.