@dougti opened this Issue on October 29th 2018

Hey guys,
Does the Real Time Visitors widget only count recent page landings?

I've added _paq.push(['enableHeartBeatTimer']); to my JS, however when monitoring our streaming pages, the live statistics in no way match the active connections I see on our streaming server.

I'd like to be able to map & visualize all of the active connections on our site. Is this possible?

Any help much appreciated

@tsteur commented on October 29th 2018 Member

Yes that's the case. I thought it would count these, but looking deeper into the code I can see it wouldn't count them even though it maybe should. See https://matomo.org/faq/how-to/faq_21824/ it is only their to correct the visit duration, but not to keep the session active. It was initially implemented like this, but then changed due to couple of problems. For example you would see visits with several hours etc.

Are you familiar with PHP ? You could create a plugin and put this file into a Columns directory to change this behaviour:

./console generate:plugin --name="YourPlugin"

namespace Piwik\Plugins\YourPlugin\Columns;
use Piwik\Tracker\Request;
use Piwik\Tracker\Visitor;
class VisitLastActionTime extends \Piwik\Plugins\CoreHome\Columns\VisitLastActionTime
    public function onExistingVisit(Request $request, Visitor $visitor, $action)
        return $this->onNewVisit($request, $visitor, $action);
This Issue was closed on October 29th 2018
Powered by GitHub Issue Mirror