getPrettyPercentFromQuotient($value); } public function compute(Row $row) { $orders = $this->getMetric($row, 'orders'); $abandonedCarts = $this->getMetric($row, 'abandoned_carts'); $visits = $this->getMetric($row, 'nb_visits'); return Piwik::getQuotientSafe($orders === false ? $abandonedCarts : $orders, $visits, GoalManager::REVENUE_PRECISION + 2); } public function getDependentMetrics() { return array('orders', 'abandoned_carts', 'nb_visits'); } }