blob: 075c6e7aaeae560e248dd81b2883f075a4ce3136 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<?php
/**
* Piwik - Open source web analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\VisitorInterest\Columns;
use Piwik\Piwik;
use Piwik\Plugin\VisitDimension;
use Piwik\Tracker\Action;
use Piwik\Tracker\Request;
class Visitsbydayssincelastvisit extends VisitDimension
{
protected $fieldName = 'visitor_days_since_last';
protected $fieldType = 'SMALLINT(5) UNSIGNED NOT NULL';
public function getName()
{
return Piwik::translate('VisitorInterest_VisitsByDaysSinceLast');
}
/**
* @param Request $request
* @param array $visit
* @param Action|null $action
* @return int
*/
public function onNewVisit(Request $request, $visit, $action)
{
return $request->getDaysSinceLastVisit();
}
}
|