ProductSKU and Ecommerce tracking

Hi, I managed to integrate piwik into opencart but I’m having some issues with the eccomerce integration, if i put all the funcitons as explained i got no tracking at all. But when i remove those requiring productSKU, piwik tracking works. I’m using opencart and there is productSKU in the system. I just don’t use it because i didn’t need it. I leave it blank when i enter products.

Should i assign productskus for every product so all the ecommerce tracking can work, or is it another problem.

These are the functions i have now

piwikTracker.trackEcommerceOrder(orderId, grandTotal, subTotal, tax, shipping, discount);

I want to use those as well:

piwikTracker.addEcommerceItem(productSKU, productName, productCategory, price, quantity);
piwikTracker.setEcommerceView(productSKU, productName, categoryName, price)

Piwik 1.7.1

Thanks in advance!

productSKU is mandatory and must be non empty

Do you plan to release your open cart plugin? it would be great and we could link it from Plugins and Themes - Analytics Platform - Matomo :slight_smile:

Hi, thanks for the answer.

I’m no programmer and i made no plugins. I just put the tracking code in catalog/view/theme/yourtheme/template/common/footer.tpl just before the tag

I think for regular tracking this could be put with vqmod, but i can’t write it


As i don’t plan to use productsku, i can’t tell if the ecommerce tracking is going to work as well. Maybe some other files need to be edited as well, because when i look at a GA vqmod it modifies few more files for tracking ecommerce.

Can’t tell if:

piwikTracker.trackEcommerceOrder(orderId, grandTotal, subTotal, tax, shipping, discount);

functions work as it is a new shop and got no orders from yesterday.

If i decide to give it a try in the future, I will let you know for sure.

I like the visitor log in Piwik showing what pages certain customer visited.

Nice tool :slight_smile:

Prem: seems you only got regular visitor tracking working. As far as I know, no opencart and piwik ecommerce integration exists. This is a tricky one, considering ajax cart updates and so on that ship with oc 1.5x.

Anyone out there with tips/hints/tutorials on how to approach this?

I’m also looking for better integration with OpenCart. Integrating the code in the footer.php would trigger the same code for every page, but it looks like there are different requirements for the product pages and the order confirmation page. I think this could be done with a VQMod, but it could get complicated pretty quick…

I sure hope someone makes a plugin for OpenCart.

Hi All! Fanfare pleeeeease…

Mod finally released properly, up on github and available to download

See Piwik OpenCart Ecommerce VQmod « Inane Coding

Currently v0.3 - still early days and requires more testing and development but its working and available to the community

Let me know your comments please and spread the word!!



Great to hear this Kevin!

We’d be happy to support the project, blog post, or at least tweet/FB, and also publish it on: Integrations - Analytics Platform - Matomo once it’s working.

I also fixed the bug you reported: Cleaning up reported by Opencart ecommerce mod… · matomo-org/matomo@4fdb65a · GitHub

Does it work for opencart users that dont use vqmod also?

Looking forward to seeing the beta/RC release (maybe create a new forum post for calling for testers as well)

Hi matt,

Thanks for the reply - and thanks for the bug fix, I’ll get that incorporated into the download for the next release.

No it doesn’t work without VQmod. However from my experience with OpenCart it is “the” standard. There are very few if any decent mods that don’t use it. From my time working with my own OpenCart site Im not worried about it hurting the success of the mod. However as the file which VQmod uses is an XML file it is quite readable so would be quite easy for a user to interpret and make the mods manually to their files - though I see no reason why any OpenCart site owner would want to do this! If its an issue then a instructions file could be made to walk through the user what to edit, there’s not that much.

It is ‘working’, and maybe ready to be published etc - but not sure what level of finished-ness might be required! I’ll start a post here and on the OpenCart forum to spread the word properly and get people to test. Once I get a first round of comments and any bugs then most of them can be rolled into the next release and hopefully that would be a good candidate to publicise on


Sounds good to me, please ping me again in a few weeks once you have had a few users testing. Nice work!