All records count twice

First off, great analytics. Much better to understand than GA. Hehe. Well, I just started trying out Piwik and managed to make it work on my server.

I have a problem though, everything is logged twice on my dashboard. I don’t know why though. Even when I check my chrome’s Network logs, it only logs once per call, but when I look at my Piwik dashboard, it counts two. Even when I track an event, one call from my site is counted twice.

Can anyone help? I don’t know where to start looking. I use the instructions here BTW JavaScript Tracking Client: Integrate - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3 and moved the code a bit for my reactJS site.

some example calls


It looks like you are tracking some custom events in your javascript code. Check for trackEvent calls in your code, as they are sending the second type of requests

Thanks for the reply @matthieu. But those are separate calls. I tried them both on separate occasions but they are counted twice and it’s still happening now.

When I see only one request from my chrome console, what could be the reason it’s counting twice? Here’s a screenshot of the request.

Separately, I tried to copy this call from the Chrome’s network tab on console and tried to curl it on my terminal and it only counted once. Could the piwik.js counting it incorrectly? Where could I be wrong here?

I tried to do it on a plain html file and here’s how it looks

    <title>Test tracking</title>
      var serverHost = "[hostServer]";
      var siteId = 1;
      var _paq = _paq || [];

      (function() {
        var u=serverHost;
        _paq.push(['setTrackerUrl', u+'piwik.php']);
        _paq.push(['setSiteId', siteId]);
        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+'piwik.js'; s.parentNode.insertBefore(g,s);

and I tried to load them only once. Did 5 tests, each changing the filename of the file and this is what I got.

Do you see same behavior in Firefox?