Returns an array of supported processed metrics and their corresponding translations. Eg
array('nb_visits' => 'Visits'). By default the given {@link $processedMetrics} are used and their
corresponding translations are looked up automatically. If a metric is not translated, you should add the
default metric translation for this metric using the {@hook Metrics.getDefaultMetricTranslations} event. If you
want to overwrite any default metric translation you should overwrite this method, call this parent method to
get all default translations and overwrite any custom metric translations.
public getProcessedMetrics ( ) : array | mixed | ||
Результат | array | mixed |
public function getProcessedMetrics() { $metrics = parent::getProcessedMetrics(); $metrics['avg_time_on_site'] = Piwik::translate('General_VisitDuration'); return $metrics; }