After Update from 2.4.0. to 2.11.1 no returning visitiors


#1

Hello,

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?


(Matthieu Aubry) #2

Hi Rikky

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


#3

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) ? "https://www.mydomain.com/" : "http://www.mydomain.com/");
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);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://www.mydomain.com/piwik.php?idsite=1" 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 || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//www.mydomain.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="//www.mydomain.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

Prior to this I had…


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

instead of


var u="//www.mydomain.com/";

Are both correct? Which one is better?

Regards, Rikky