Skip to content

Commit

Permalink
refs #7213 - add segmented visitor log to referrer type table
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Jan 5, 2016
1 parent 040cf00 commit adfcb9d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/Referrers/API.php
Expand Up @@ -106,6 +106,15 @@ public function getReferrerType($idSite, $period, $date, $segment = false, $type
// set subtable IDs for each row to the label (which holds the int referrer type)
$dataTable->filter('Piwik\Plugins\Referrers\DataTable\Filter\SetGetReferrerTypeSubtables', array($idSite, $period, $date, $segment, $expanded));

$dataTable->filter('AddSegmentByLabelMapping', array(
'referrerType',
array(
Common::REFERRER_TYPE_DIRECT_ENTRY => 'direct',
Common::REFERRER_TYPE_CAMPAIGN => 'campaign',
Common::REFERRER_TYPE_SEARCH_ENGINE => 'search',
Common::REFERRER_TYPE_WEBSITE => 'website',
)
));
// set referrer type column to readable value
$dataTable->queueFilter('ColumnCallbackReplace', array('label', __NAMESPACE__ . '\getReferrerTypeLabel'));

Expand Down

0 comments on commit adfcb9d

Please sign in to comment.