Hi,
This is intentional as Matomo plugins need to add code to the piwik.js to track additional things and this replaces the piwik.js.
But you can use the same technique:
When you create a plugin and add a tracker.js
and tracker.min.js
to it’s root directory, it’s content will be copied into the piwik.js.
More Information:
You can check how this plugin does it: