Download tracking in Matomo is really simple:
It just checks if the link a visitor clicks on ends with a known file extension (e.g.
.pdf) and if so the click gets tracked as a download.
So if you download URL looks like
https://example.com/dowloader.php?id=34525 or something like this, Matomo doesn’t know this is a download by default.
You can simply fix this as explained here:
Recording a click as a download
If you want to force Piwik to consider a link as a download, you can add the ‘piwik_download’ css class to the link:
<a href='last.php' class='piwik_download'>Link I want to track as a download</a>
Note: you can customize and rename the CSS class used to force a click to be recorded as a download:
// now all clicks on links with the css class "download" will be counted as downloads
// you can also pass an array of strings