Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 4243

Change cookie lifetime (no replies)

$
0
0
Hey guys,

I would like to change the cookie lifetime to 7 days. Unfortunately, I don't know JavaScript well.
Hopefully someone can help me.
This is the Code in my Piwik Admin surface:

<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);

(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http" ) + "://www.worlds-facets.de/stat/";
_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>
<!-- End Piwik Code -->

Here Piwik describes how to change the cookie lifetime, but the code in this example looks different than mine:
http://developer.piwik.org/api-reference/tracking-javascript

Moreover, I don't even understand how the cookie is set in the above mentioned codes. I thought, cookies are set
by set.Cookie or similar.

Thanks for your help!

Viewing all articles
Browse latest Browse all 4243

Trending Articles