The Matomo QUIQQER Module integrates Matomo into QUIQQER. Matomo is the leading open-source analytics platform that gives you more than just powerful analytics.
By using the Matomo plugin you save the trouble of manually embedding the Matomo tracking Codes for all of your different project in to all of their pages. The Matomo plugin takes care of all of this.
Because we prepare QUIQQER for the E-Commerce world, also every shop owner would like to have some statistics about the buying behaviour of his users.
In version 1.3 the Matomo QUIQQER module now also integrates e-commerce tracking. The shopping cart, product handling, ordering process behavior, all this is now included in the statistics.
So that the statistics module can react to the different events, we have integrated new events into the order module.
Events are certain happenings that may occur at some point and that can be addressed via the QUIQQER API. Since these changes are not yet available in any version and are included in the Order Release, I will not go into them here.
To make the whole thing easy to handle, we have outsourced the e-commerce tracking to an own file. This is no problem due to the events integration.
https://github.com/QUIQQER/package-piwik/blob/master/bin/eCommerceTracking.js
If the Order Module is installed, the Tracking Module will include this file on each page.
The complete e-commerce tracking is loaded asnycron and thus the loading performance for the user is not affected.
For quick and easy tracking, I have implement various util functions for this purpose:
I don't have a screenshot of every function, as this would simply be too much code
I hope I was able to give you a small overview which changes the new statistics version has to offer. As soon as our order module is in the stable version, everything is ready for a successful start with your own shop.
The tracking in e-commerce will now be tested for a few weeks in our services and corrected in case of possible errors. So that everything runs stable when we release the order system.
Little hint
I know that we can use let and const, but since we have IE11 compatibility and IE11 has some bugs in let and const usage, we can't change our code right now. And I don't want to add an additional compilation step.
Thanks for reading,
Hen and Jan, for PCSG Developers