File download goal not triggered; why?

I am running Matomo selfhosted on my website
Page visits are reported correctly.

Now I have tried to add a goal, to count the number of downloads of our file. I used Settings > Goal > Add a new goal and entered a goal name, destription and trigger. The trigger is "file
Pattern contains: ".

I created the goal several weeks ago, and I am sure that many people downloaded the file. Still, the goal conversion count remains at zero.

Is there anything else I need to do to activate this goal? For example, do I need to add any javascript code to the download link ?

Have you also integrated click tracking? Without clicktracking it will not be possible to track the click on the download. The best way is to use the matomo tag manager.


I don’t know what click tracking or the tag manager are.

I have now activated the tag manager, but still don’t understand how to use it or what click tracking is. Could you point me to the relevant documentation and/or give me some hints? I am just a beginner with Matomo.


here is the documentation auf click tracking: Event Tracking User Guide - Analytics Platform - Matomo and maybe this video can help you: YouTube

But without the click tracking you can see your downloads in this report: How does Piwik track downloads? FAQ - Analytics Platform - Matomo


Under Behaviour > Downloads, it says "There is no data for this report. "

I checked the FAQ, and tried the 3 options suggested there:

  1. There is no ‘onclick’ on the download link; it is a plain a-tag, so the problem is not an onclick handler returning non-false:
    <a href="/downloads/Windows/" class="button bluebtn">&nbsp;
      <i class="fas fa-download fa-fw"></i>&nbsp;&nbsp;Embeetle
      <span class="version-windows"></span> for
      &nbsp;&nbsp;<i class="icon-windows"></i> Windows&nbsp;&nbsp;
  1. As suggested by the FAQ I increased the tracking delay:
    _paq.push([‘setLinkTrackingTimer’, 2000]);
    Still "There is no data for this report. "

  2. I tried the Manually record a click as a download link, but still "There is no data for this report. ". This is the link I tried, copied from the documentation, except that I changed the file to be downloaded. Should the class still be piwik_download, or should it be matomo_download?
    <a href='/downloads/Windows/' class='piwik_download'>Link I want to track as a download</a>

Any other suggestions?

In dashboard > behavior > downloads, should new download events be shown immediately after a download (assuming I select today’s date at the top and reload the page), or is there some delay?

I have added a very simple test page to the website, containing only Matomo initialization code and a download link. I copied the html below; it is at Embeetle IDE download test. Is there anything wrong with this code?

<html lang="en-US">
    <title>Embeetle IDE download test</title>
    <meta charset="UTF-8" />
    <!-- Matomo -->
    <script type="text/javascript">
      var _paq = window._paq || [];
      /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
      _paq.push(["setDomains", [""]]);
      (function() {
      var u="//";
      _paq.push(['setTrackerUrl', u+'matomo.php']);
      _paq.push(['setSiteId', '1']);
      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
      g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
    <!-- End Matomo Code -->
  <a href="/downloads/Windows/">Download</a>

Is there anywhere where I can check that the download link is actually detected by Matomo?

I guess I am making some stupid beginners mistake somewhere, but I have no clue how to start debugging. I know html and javascript, but I don’t have the time to learn and debug Matomo code.