Downloads are not being tracked

Hello,

My downloads (mainly pdfs) are not being tracked by Matomo. I can see there are indeed files being downloaded when I scan my logs but Matomo downloads page stays empty no matter the time period I check.
Is there something I must do to get those metrics ? My understanding is that it is automatically tracked.
Maybe something to do with my website being a Joomla site ?

Thanks for your help.

Hi @barredespace
As fas as I know, Maotmo automatically detect downloads when the target of the link ends with standard downloaded files (eg. .pdf, .docx, etc.).
If your link ends with .php for example, then Matomo can’t track it automatically as a download.

Merci @heurteph-ei and thanks too ^^
That’s what I thought too and indeed, my links end with .pdf.
Could it be that it’s because I make use of a script to make sure the files are displayed inside the browser when there’s a viewer available instead of being downloaded ?

Hi @barredespace
Probably; You should try to remove the script that manage the PDF opening, to see if it is the source of Matomo not tracking the download. I imagine your script could listen to the click event (an maybe upper in the DOM tree?) and not propagate the click to the HTML link itself, that could prevent the download tracking event…

Well, it is a Joomla website and I’d rather not mess with the scripts used by some of its core components. I tried to add the matomo_download class to all the links but I’m not very optimistic. I’ll try to find the exact script anyway just to be sure.