Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-08-25 17:14:23 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-08-26 11:23:38 +0400
commitade4198dd4bdcfd7c03119bb52208e006bf64082 (patch)
tree4cfb4e9eaf3a09ac765d16a40927c7cd111353da /plugins/VisitorInterest/VisitorInterest.php
parent63777c8158e50e4da66b13bb96c360f2550fcd0f (diff)
refs #6045 #6049 added an event to collect visitor info and made sure the Piwik UI kinda works when most tracker plugins are disabled
Diffstat (limited to 'plugins/VisitorInterest/VisitorInterest.php')
-rw-r--r--plugins/VisitorInterest/VisitorInterest.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/VisitorInterest/VisitorInterest.php b/plugins/VisitorInterest/VisitorInterest.php
index 70f5c48e4f..b1efd31d0f 100644
--- a/plugins/VisitorInterest/VisitorInterest.php
+++ b/plugins/VisitorInterest/VisitorInterest.php
@@ -15,12 +15,19 @@ use Piwik\Piwik;
use Piwik\Plugins\CoreVisualizations\Visualizations\Cloud;
use Piwik\Plugins\CoreVisualizations\Visualizations\Graph;
-/**
- *
- */
class VisitorInterest extends \Piwik\Plugin
{
+ /**
+ * @see Piwik\Plugin::getListHooksRegistered
+ */
+ public function getListHooksRegistered()
+ {
+ return array(
+ 'Live.getAllVisitorDetails' => 'extendVisitorDetails',
+ );
+ }
+
function postLoad()
{
Piwik::addAction('Template.headerVisitsFrequency', array('Piwik\Plugins\VisitorInterest\VisitorInterest', 'headerVisitsFrequency'));
@@ -40,4 +47,10 @@ class VisitorInterest extends \Piwik\Plugin
$out .= FrontController::getInstance()->fetchDispatch('VisitorInterest', 'index');
$out .= '</div>';
}
+
+ public function extendVisitorDetails(&$visitor, $details)
+ {
+ $visitor['daysSinceLastVisit'] = $details['visitor_days_since_last'];
+ }
+
}