I have a given PDF-URL /foo.pdf.
The link to the PDF is embedded on a webpage with the URL /bar.html; but also on other webpages.
I would like to use the API to query the number of downloads for the PDF that have taken place on the /bar.html webpage.
I have tried both the endpoint Actions.getDownload and Actions.getDownloads. However, neither endpoint gives me any information about which webpage URL the download took place on.
Is there a way to filter the API query directly to the webpage URL where the download for the PDF URL occurred? Or is there another endpoint that provides me with the desired information?
Hi @heurteph-ei ,
Thanks for your reply. However, I’m not quite sure if I understand it correctly. The default tracking for downloads is activated. Accordingly, I get back the number of downloads of a specific resource via the API. Nevertheless, I do not receive any information in the response about the URL on which the download event took place.
Hi @Rizwan322,
thank you for your reply. Unfortunately, it misses my question, as I want to retrieve the data from Matomo and also need the data for all downloads, not just for one that I execute manually on an ad hoc basis.
Hi @PaLu
If you can’t use the tag manager, you can add an even on download links that will do the job… _paq.push(['trackEvent', 'Download', document.location.href, clickedElement.href]);