After Update from 2.4.0. to 2.11.1 no returning visitiors


I’ve upgraded from 2.4.0. to 2.11.1. Now every click is count as a new visit. No Returning visitors anymore.

Any idea?

Hi Rikky

I don’t have an idea.can you post a screenshot of your Visitor > Visitor Log ?

Hi Matt,

I solved the issue, respectively I worked around it. I still used the old Piwik-Javascript-Tracking-Code and after I replaced it with the current one, the returning visitors returned. :wink:

Here’s the old one:

<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "" : "");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
} catch( err ) {}
</script><noscript><p><img src="" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Tag -->

Another question regarding the Tracking code, Piwik 2.11.1 shows this as the tracking-code:

<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  (function() {
    var u="//";
    _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);
<noscript><p><img src="//" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

Prior to this I had…

var u=(("https:" == document.location.protocol) ? "https" : "http") + "://";

instead of

var u="//";

Are both correct? Which one is better?

Regards, Rikky