Visits not getting counted

Dear all,

I have one site, whose data isn’t getting counted by matomo, even though the code seems correct.

Matomo instructs me to use the following tracking code:

<!-- Matomo -->
<script type="text/javascript">
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="https://stats.enip.eu/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '25']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- End Matomo Code -->

The site which has its own builtin Matomo support generates the following code:

<script type="text/javascript">
	var _paq = window._paq = window._paq || [];	
              _paq.push(['trackPageView']);
              _paq.push(['enableLinkTracking']);
              (function() {
                var u="https://stats.enip.eu/";
                _paq.push(['setTrackerUrl', u+'matomo.php']);
                _paq.push(['setSiteId', '25']);
                var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
                g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
              })();
        </script>

I also can verify in the Matomo server log that matomo URL really gets called:

********* - - [04/Aug/2020:09:35:38 +0200] "GET /matomo.js HTTP/1.1" 200 70721 "https://fpic.enip.eu/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 Epiphany/605.1.15" "-"
*********- - [04/Aug/2020:09:35:39 +0200] "GET /matomo.php?action_name=Landing%20page%20%E2%80%A2%20Indigenous%20FPIC%20Protocols&idsite=25&rec=1&r=150196&h=9&m=35&s=39&url=https%3A%2F%2Ffpic.enip.eu%2F&_id=a2914c93c2fcccb3&_idts=1596526540&_idvc=1&_idn=1&_refts=0&_viewts=1596526540&send_image=1&java=1&cookie=1&res=1366x768&gt_ms=445&pv_id=khMVAa HTTP/1.1" 200 286 "https://fpic.enip.eu/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 Epiphany/605.1.15" "-"

What could be the reason why Matomo still doesn’t count it?

I would greatly appreciate any ideas…

Hi,

The most common reasons are:

  • The browser you are testing the tracking with has DoNotTrack enabled and Matomo respects that

or

  • The date selector in Matomo by default shows the data for yesterday and if you only started tracking today, then it is obviously empty.

Thanks for your response. However, I had already thought of and tested for those issue.

Again, the server logs show that the Matomo URL is actually called. And yes, I switched the day to today (and this situation has persisted for quite some days nows.

Hm, now, one visit for yesterday is shown. Strange.