Move $visit->recognizeTheVisitor() into his own class : Visitor::recognize();
Needed for https://github.com/VincentLahaye/piwik-chat
Thanks for the PR! I put in some comments as code review.
Otherwise, it is a nice idea to refactor logic from the Tracker, and good to see it helps you build a useful plugin for Piwik!