Tracking .pdf download on Piwik site

Hello Community,

I know this subject has been discussed several times but I cannot find a post or some documentation to confirm if what I did is correct and where the problem might be.

I have created a php echo

echo ‘English

The URL appears correctly and file downloads correctly, when I go see my PIWIK statistics under actions download, I do not see any trace of the download and i see “There is no data for this report.”

Where am I doing the mistake?

Thanks in advance for the assistance!

Are you using a segment ?

Could your problem be related to New segments: Download file URL 'downloadUrl' and Outlink URL 'outlinkUrl' · Issue #4103 · matomo-org/piwik · GitHub or 301 Moved Permanently ?

Dali (just trying to help)

yes it should work - as per documentation in: JavaScript Tracking Client: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

Maybe check that when you click on the link there is JS error? Also in the browser developer console you should seet he HTTP requests leaving to PIwik when you click ?

The issue is solved, thanks for the help.

I was using the joomla plugin which did not provide functionality for the “piwik_download” class. I have added the javascript directly to the template and it now works very well. I also added the target=“blank” to make sure the download is counted on all browsers.