Piwik 1.12: Change Cookie Lifetime

Hey folks,

I´m trying to change the cookie lifetime of the visitorscookie from 2 years to 1 week - regarding the german web privacy law - but it doesn´t work.

I added this code already in my footer:


01	<!-- Piwik -->
02	<script type="text/javascript">
03	var _paq = _paq || [];
04	(function(){
05	    var u=(("https:" == document.location.protocol) ? "https://{url.zu.piwik}/" : "http://{url.zu.piwik}/");
06	    _paq.push(['setSiteId', {ID}]);
07	    _paq.push(['setTrackerUrl', u+'piwik.php']);
08	    _paq.push(['setVisitorCookieTimeout', '604800']);
09	    _paq.push(['setSessionCookieTimeout', '0']);
10	    _paq.push(['trackPageView']);
11	    _paq.push(['enableLinkTracking']);
12	    var d=document,
13	        g=d.createElement('script'),
14	        s=d.getElementsByTagName('script')[0];
15	        g.type='text/javascript';
16	        g.defer=true;
17	        g.async=true;
18	        g.src=u+'piwik.js';
19	        s.parentNode.insertBefore(g,s);
20	})();
21	</script>
22	<!-- End Piwik Code -->

What´s wrong? Is there a possibility to change the piwik files (like the config.ini.php in the earlier versions)?

I beg you for helping me!!!

Cheers

Try without the quotes around numbers:


_paq.push(['setVisitorCookieTimeout', 604800]);
_paq.push(['setSessionCookieTimeout', 0]);

if it still does not work, what od you mean by that?