With the implementation of first party cookies in #409, the reliance on client-side cookie storage is growing. This is causing problems where sites are using multiple trackers and/or amassing more content in the cookie.
Requirements:
- a single client side cookie per tracking server
- server-side storage for the bulk of the corresponding cookie's contents
- ability to track multiple site IDs
Benefits of a smaller cookie:
- lowers risk of failed tracking requests; less overhead in the HTTP request
- less data exposed to third-parties who peek into document.cookie
Impact:
- database: increased storage requirements; slower tracker performance; requires a cleanup mechanism (to mimic cookie expiry)
- this is not going to be backwards compatible; so targeting for Piwik 2.0
Misc:
- piwik.js has become somewhat bloated; also, while the coding convention used allows for true private variables, JavaScript coding practices have moved towards the prototype model; so, we may want to consider this for a rewrite
- the js/ proxy could browser sniff, and serve out a smaller version of piwik.js which uses the browser's native JSON (e.g., FF3.5+, IE8+; not sure about Safari/Chrome/Opera)