Piwik\DataTable\Filter\
Adds processed metrics columns to a DataTable using metrics that already exist.
Columns added are:
nb_actions / nb_visitsround(visit_length / nb_visits). Not
pretty formatted.bounce_count / nb_visitsAdding the filter_add_columns_when_show_all_columns query parameter to an API request will trigger the execution of this Filter.
Note: This filter must be called before ReplaceColumnNames is called.
Basic usage example
$dataTable->filter('AddColumnsProcessedMetrics');
The class defines the following methods:
__construct() — Constructor.filter() — Adds the processed metrics.enableRecursive() ash; Enables/Disables recursive filtering. Inherited from BaseFilterfilterSubTable() ash; Filters a row's subtable, if one exists and is loaded in memory. Inherited from BaseFilter__construct()Constructor.
It accepts the following parameter(s):
$table (DataTable) —
$deleteRowsWithNoVisit (bool) —
Whether to delete rows with no visits or not.
filter()Adds the processed metrics. See AddColumnsProcessedMetrics for more information.
It accepts the following parameter(s):
$table (DataTable) —It does not return anything or a mixed result.
enableRecursive()Enables/Disables recursive filtering. Whether this property is actually used is up to the derived BaseFilter class.
It accepts the following parameter(s):
$enable (bool) —It does not return anything or a mixed result.
filterSubTable()Filters a row's subtable, if one exists and is loaded in memory.
$row (Row) —
The row whose subtable should be filter.