Use https or http for noscript URL in tracking script?


#1

The first part of the script uses either http or https based on the protocol, but the noscript only uses http. Do we have to adjust this ourselves, if we use https?


<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://stats.mywebsite.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.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="http://stats.mywebsite.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->


(Matthieu Aubry) #2

Yes please adjust it to https if you use https


#3

Great, thanks! (tu)

By the way, it would be great if the blog post date was included in the list: Piwik blog