You may be able to find a plugin that adds Piwik's e-commerce tracking to the shopping cart software that you use. But often you will be faced with writing your own code for your e-commerce platform. If you know your shopping cart well enough to write custom code for it, it is really not that hard to integrate Piwik tracking and the payoff is worth the work.
We are going to write a plugin for ZenCart. When I was writing this book, I couldn't find a plugin for the ZenCart installation I was using to test Piwik, so I figured we could write one. ZenCart is an open source e-commerce shopping cart that branched from osCommerce in 2003. osCommerce is still the more popular of the two platforms, but I prefer ZenCart for ease of modification.
Although we will be writing a plugin for ZenCart, you can use similar logic when writing custom code for your e-commerce platform. If we look back over the previous code, we can see that we need to find four types of...