Using localStorage rather than cookies


I am trying to instrument a Single Page web application running on a device where the pages are loaded via the file:// protocol. Cookies are not available, but HTML5 localStorage is.

Is it possible to for the website developer to manage the creation and persistence of a unique ID for a user, and to manually send that ID when starting the tracker rather than allowing the piwik.js file write any cookies?

Many thanks,


It is not possible yet to use html5 storage instead of cookies, but we could build such feature if needed…

Thanks… I should have read deeper before posting I guess too. I found the Tracking API (, which does seem to accept an ‘_id’ parameter. I should be able to use this and manage the id myself, and use some JS to create the beacons.