@SVyatoslavG opened this Issue on November 9th 2017

Hi everyone.
I am getting this error very ofter.
Error in Piwik (tracker): Invalid idSite: '0', referer: http://www.example.com/my-page.html
I have site with about 100.000 pageviews per week and this error happens ones every 10-15 second in the apache log.
It definitely comes from core/Tracker/Request.php
core/Tracker/Request.php
Is there any solution for this? I believe its a bug because I have only 1 site with PIWIK tracking code installed and about half of traffic actually makes on the PIWIK end.

@sgiehl commented on November 13th 2017 Member

Maybe the tracking code is not integrated correctly at some point. Would you mind sharing the site you are tracking. I would have a short look if everything is correct...

@Sudrien commented on April 4th 2018

Since the original poster didn't provide, here's my examples from this evening, with slight redaction:

2018/04/03 23:41:55 [error] 22749<a href='/0'>#0</a>: *2338 FastCGI sent in stderr: "PHP message: Error in Matomo (tracker): Invalid idSite: '0'" while reading response header from upstream, client: 182.253.139.67, server: m.sudrien.net, request: "GET /js/?pg=*****&appid=5&lt=log&pv_rf=https%3A%2F%2Fwww.google.co.id%2F&uuid=e880d415-6fcd-4963-9953-ed43f074c0ea&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=1&java=1&gears=0&ag=0&cookie=1&res=1366x768&gt_ms=581 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "*****", referrer: "*****"
2018/04/04 00:10:02 [error] 22749<a href='/0'>#0</a>: *3966 FastCGI sent in stderr: "PHP message: Error in Matomo (tracker): Invalid idSite: '0'" while reading response header from upstream, client: 182.253.139.67, server: m.sudrien.net, request: "GET /js/?pg=*****&appid=5&lt=log&pv_rf=https%3A%2F%2Fwww.google.co.id%2F&uuid=e880d415-6fcd-4963-9953-ed43f074c0ea&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=1&java=1&gears=0&ag=0&cookie=1&res=1366x768&gt_ms=539 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "*****", referrer: "*****"
  • It's Nginx
  • Site 0 has been deleted (consolidated with another)
  • using _paq.push(['setTrackerUrl', u+'js/']);
  • google.co.id does not show up in all of them, but frequently
@pablitok commented on June 18th 2018

Same problem here.

  • Nginx version: 1.12.0
  • Site 0 doesn't exists
  • The piwik js is inserted via google tag manager

    <!-- Piwik -->
    <script type="text/javascript">
      var _paq = _paq || [];
      _paq.push(["setDomains", [(...)]]);
      _paq.push(['trackPageView']);
      _paq.push(['enableLinkTracking']);
      _paq.push(['enableHeartBeatTimer', 10]);
      (function() {
        var u="https://(...).com/";
        _paq.push(['setTrackerUrl', u+'piwik.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+'piwik.js'; s.parentNode.insertBefore(g,s);
      })();
    </script>
    <noscript><p><img src="https://(...).com/piwik.php?idsite=1" style="border:0;" alt="" /></p>
    </noscript>
@huang0808 commented on June 20th 2018

@SVyatoslavG I met this error too, Did you fix them? mysite is no idsite=0

@huang0808 commented on July 30th 2018

@pablitok @sgiehl how did you fix it? I met too.

Powered by GitHub Issue Mirror