Custom variable and visitor differentiation

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.

Thanks for any help

we have pretty much the same problem, we’re trying to force the piwik to create a new internal visit based on the our sessionid. I did some research and I still don’t know how to do it.,82812,82812,84656,84656
This threads didn’t help.

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.

Thank you!

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: )

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.

Is there a ticket in track for this ? … to add the patch there, as per ; did not manage to find one …

have verbal consent from management and customers to release this, can get release papers signed if needed.

patch here visitor differentiation based on a custom variable · Issue #3309 · matomo-org/matomo · GitHub

Thanks a lot for the patch emil. It saved me a ton of work!