Enhanced Ecommerce Plugin

I’m currently working on a plugin to extend the functionality of the Ecommerce part of Matomo to reach the level of what GA4 offers.

I’m looking to extend the JS functions (piwik.js) to add functions via the plugin :

I can’t figure out how to do this so that these methods can call private functions like trackCallback.

For now, the javascript client seems not ready to be extended in that way. I’m my own tracking to backend with PHP Client that can be extended more easily.