Piwik\DataTable\Filter\
Adds goal related metrics to a DataTable using metrics that already exist.
Metrics added are:
Adding the filter_update_columns_when_show_all_goals 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('AddColumnsProcessedMetricsGoal',
array($enable = true, $idGoal = Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER));
The class defines the following methods:
__construct()
— Constructor.filter()
— Adds the processed metrics.enableRecursive()
ash; Enables/Disables recursive filtering. Inherited from BaseFilter
filterSubTable()
ash; Filters a row's subtable, if one exists and is loaded in memory. Inherited from BaseFilter
getProcessOnlyIdGoalToUseForReport()
— Returns an idGoal override to use for the processOnlyIdGoal parameter of this filter if $requestMethod is for a Actions page report or an Actions entry page report.__construct()
Constructor.
It accepts the following parameter(s):
$table
(DataTable
) —
$enable
$processOnlyIdGoal
$goalsToProcess
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.getProcessOnlyIdGoalToUseForReport()
Returns an idGoal override to use for the processOnlyIdGoal parameter of this filter if $requestMethod is for a Actions page report or an Actions entry page report.
It accepts the following parameter(s):
$idGoal
$requestMethod
(string
) —
Returns: int
|string
|null
—