Cookies and subdomains


#1

I have Piwik installed on a server with the following structure:

/www/admin -> admin.domain.com
/www/admin/piwik -> admin.domain.com/piwik
/www/basic -> www.domain.com
/www/full -> ov.domain.com
/static/images -> img.domain.com
/static/js -> js.domain.com
/static/css -> css.domain.com
/static/swf -> swf.domain.com

No cookies are set in the img,js,css,swf domains (in PHP or Nginx), while www and ov have PHP cookies set.

The Piwik tracking javascript is installed in index.php of www and ov domains, using the same site id.

Here’s the issue, Piwik is generating request cookies for the img,js,css and swf domains, where those are supposed to be cookieless…is there any way to disable cookie generation per domain…or perhaps some kind of file filter (like, if file is css, do not generate request cookie) to solve this issue?


(Matthieu Aubry) #2

where those are supposed to be cookieless…is there any way to disable cookie generation per domain…

sure, use ‘disableCookies’ js function: JavaScript Tracking Client: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3