I tried searching a bit, but maybe someone knows if its possible to differentiate visitors based on a custom variable. I’ve setup piwik to track users of a learning management system in business settings. Two of the variables I’m passing are account type and account id. Multiple people can access the system from a single computer and so in the visitor log I’m getting just one long visit and it’s only reporting the last custom variable sent. So if company_newemployee uses the system for two hours and then company_administrator gets on for 60 seconds to check a result, it will show company_administrator as having a 2 hour visit.
Can you piwik guys please give us a proper answer for this one?
I think piwik is a really good tool, but our company is thinking to more to a better solution because of this kind of problems.
It is not a feature in Piwik to be able to create “new visits” on demand, otherwise it would be too easy to spam Piwik with new visits. but you can create a ticket with your request and use cases to try and convince us to implement it (or hire a Piwik dev: http://piwik.org/consulting/ )
I fixed this problem by modifying only the piwik.js file: replaced the uuid based on browser info and timestamp with one based on the same browser info, a session id passed to the Tracker object at instantiation and a date string (to force a new visit if the session id did not expire after date change).
The change is trivial, only in javascript, needs trust_visitors_cookies = 1 in global.ini.php; I tested it only on Linux with Firefox 14.0.1 for now.