Piwik\Plugins\Goals\Columns\Metrics\
The conversion rate for ecommerce orders.
Calculated as:
(orders or abandoned_carts) / nb_visits
orders and abandoned_carts are calculated by the Goals archiver.
The class defines the following methods:
compute()
ash; Computes the metric using the values in a Row. Inherited from ProcessedMetric
getDependentMetrics()
ash; Returns the array of metrics that are necessary for computing this metric. Inherited from ProcessedMetric
getTemporaryMetrics()
ash; Returns the array of metrics that are necessary for computing this metric, but should not be displayed to the user unless explicitly requested. Inherited from ProcessedMetric
beforeCompute()
ash; Executed before computing all processed metrics for a report. Inherited from ProcessedMetric
compute()
Computes the metric using the values in a Row.
The computed value should be numerical and not formatted in any way. For example, for
a percent value, 0.14
should be returned instead of "14%"
.
It accepts the following parameter(s):
$row
(Row
) —It returns a mixed
value.
getDependentMetrics()
Returns the array of metrics that are necessary for computing this metric.
The elements of the array are metric names.
string[]
value.getTemporaryMetrics()
Returns the array of metrics that are necessary for computing this metric, but should not be displayed to the user unless explicitly requested.
These metrics are intermediate metrics that are not really valuable to the user. On a request, if showColumns or hideColumns is not used, they will be removed automatically.
string[]
value.beforeCompute()
Executed before computing all processed metrics for a report.
Implementers can return false
to skip computing this metric.