I manage a content website where some pages provide downloadable files alongside regular informational content. I would like to understand how other Matomo users track downloads separately from normal page views.
For example, I want to know which files receive the most downloads without confusing those numbers with visits to the page itself. Is the recommended approach to use Matomo’s automatic download tracking, or would it be better to create custom events for each download button?
I would also like to distinguish between users who simply read a page and users who actually click to download a file. My website has different types of downloadable content, so having clear data about download activity would be very useful.
I am trying to understand the best way to separate page engagement from actual download actions.
What would be the cleanest setup for this in Matomo? Any advice or examples would be appreciated.
For this use case, I would recommend using Matomo’s built-in Download tracking rather than creating separate custom Events for every download button.
Matomo automatically detects clicks on links to common downloadable file types such as PDF, DOCX, XLSX and ZIP files. These are recorded separately from page views and can be viewed under Behaviour > Downloads. This allows you to clearly distinguish between someone viewing a page and someone actually clicking to download a file.
The Downloads report includes both Downloads and Unique Downloads, so it is also a straightforward way to identify your most popular files.
For example, if a visitor:
Views /resources/report
Clicks /downloads/report.pdf
Matomo records the first interaction as a Page View and the second as a Download. The download doesn’t need to be implemented as an additional Event just to distinguish it from the page view.
If your download URLs don’t have recognisable file extensions—for example, a button points to /download?id=123—you can explicitly tell Matomo to treat the link as a download. This can be done using the matomo_download CSS class or by manually tracking it as a download.
Events would be more appropriate if you wanted to collect some additional interaction that isn’t represented by the download itself, but I wouldn’t recommend tracking the same click as both a Download and an Event unless you specifically need the additional information.
So I would start with Matomo’s standard Download tracking and only introduce Events or Custom Dimensions if you need reporting beyond the file download itself.
use Matomo’s built-in automatic download tracking first, it’s already separate from page views by default (Behavior > Downloads report). Add custom events only for cases automatic tracking can’t catch well, like JS-triggered downloads or when you want to group downloads by category. Just confirm your file types are in the tracked extensions list under Administration > Websites > Manage.
A clean setup would be to keep page views and downloads as separate actions. Matomo’s automatic download tracking is usually the easiest option if the file types are supported. Custom events can be useful when you need to track specific buttons or different download categories. That way you can compare normal page engagement with actual download activity without mixing the numbers.