Quantcast
Viewing all articles
Browse latest Browse all 4243

Tracking code - cookie expiration (no replies)

Hi there,

due to local law, I have to change the cookie experiation date. I want to set it to 14 days.

Would adding these 2 lines of code (setVisitorCookieTimeout('1209600');
setSessionCookieTimeout('0');) at this point (see below) be correct?


<!-- Piwik -->
<script type="text/javascript"> 
  var _paq = _paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u=(("https:" == document.location.protocol) 

? "https" : "http") + 

"://www.domain.de/******//";
    _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);
  })();
setVisitorCookieTimeout('1209600');
setSessionCookieTimeout('0');
</script>
<noscript><p><img 

src="http://www.domain.de/******/piwik.php?

idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Code -->

Any help would be greatly appreciated as I am not a coder/programmer but still want a great open source statistics programme like piwik instead of corporate google analytics :-)

Viewing all articles
Browse latest Browse all 4243

Trending Articles