public function main() { $this->viewProperties['show_exclude_low_population'] = true; $this->viewProperties['show_goals'] = true; $this->setColumnsToDisplay(array('label', 'nb_visits', 'goals_conversion_rate', 'goal_%s_conversion_rate', 'revenue_per_visit')); parent::main(); }
public function main() { $this->idSite = Piwik_Common::getRequestVar('idSite', null, 'int'); $this->processOnlyIdGoal = Piwik_Common::getRequestVar('idGoal', 0, 'string'); $this->isEcommerce = $this->processOnlyIdGoal == Piwik_Archive::LABEL_ECOMMERCE_ORDER; $this->viewProperties['show_exclude_low_population'] = true; $this->viewProperties['show_goals'] = true; if (Piwik_Common::getRequestVar('documentationForGoalsPage', 0, 'int') == 1) { $this->setReportDocumentation(Piwik_Translate('Goals_ConversionByTypeReportDocumentation', array('<br />', '<br />', '<a href="http://piwik.org/docs/tracking-goals-web-analytics/" target="_blank">', '</a>'))); } $this->setMetricDocumentation('nb_visits', Piwik_Translate('Goals_ColumnVisits')); if ($this->isEcommerce) { $this->setMetricDocumentation('revenue_per_visit', Piwik_Translate('Goals_ColumnRevenuePerVisitDocumentation', Piwik_Translate('General_EcommerceOrders'))); $this->setColumnsTranslations(array('goal_%s_conversion_rate' => Piwik_Translate('Goals_ConversionRate'), 'goal_%s_nb_conversions' => Piwik_Translate('General_EcommerceOrders'), 'goal_%s_revenue' => Piwik_Translate('General_TotalRevenue'), 'goal_%s_revenue_per_visit' => Piwik_Translate('General_ColumnValuePerVisit'), 'goal_%s_avg_order_revenue' => Piwik_Translate('General_AverageOrderValue'), 'goal_%s_items' => Piwik_Translate('General_PurchasedProducts'))); $this->setColumnsToDisplay(array('label', 'nb_visits', 'goal_%s_nb_conversions', 'goal_%s_revenue', 'goal_%s_conversion_rate', 'goal_%s_avg_order_revenue', 'goal_%s_items', 'goal_%s_revenue_per_visit')); // Default sort column $this->setSortedColumn('goal_ecommerceOrder_revenue', 'desc'); } else { $this->setMetricDocumentation('revenue_per_visit', Piwik_Translate('Goals_ColumnRevenuePerVisitDocumentation', Piwik_Translate('Goals_EcommerceAndGoalsMenu'))); $this->setColumnsTranslations(array('goal_%s_conversion_rate' => Piwik_Translate('Goals_ConversionRate'), 'goal_%s_nb_conversions' => Piwik_Translate('Goals_Conversions'), 'goal_%s_revenue' => '%s ' . Piwik_Translate('Goals_ColumnRevenue'), 'goal_%s_revenue_per_visit' => '%s ' . Piwik_Translate('General_ColumnValuePerVisit'), 'nb_conversions' => Piwik_Translate('Goals_ColumnConversions'), 'conversion_rate' => Piwik_Translate('General_ColumnConversionRate'), 'revenue' => Piwik_Translate('Goals_ColumnRevenue'), 'revenue_per_visit' => Piwik_Translate('General_ColumnValuePerVisit'))); $this->setColumnsToDisplay(array('label', 'nb_visits', 'goal_%s_nb_conversions', 'goal_%s_conversion_rate', 'goal_%s_revenue', 'goal_%s_revenue_per_visit', 'revenue_per_visit')); // Default sort column $columnsToDisplay = $this->getColumnsToDisplay(); $columnNbConversionsCurrentGoal = $columnsToDisplay[2]; if ($this->processOnlyIdGoal > 0 && strpos($columnNbConversionsCurrentGoal, '_nb_conversions') !== false) { $this->setSortedColumn($columnNbConversionsCurrentGoal, 'desc'); } } parent::main(); }
public function main() { $this->idSite = Piwik_Common::getRequestVar('idSite', null, 'int'); $this->processOnlyIdGoal = Piwik_Common::getRequestVar('filter_only_display_idgoal', 0, 'int'); $this->viewProperties['show_exclude_low_population'] = true; $this->viewProperties['show_goals'] = true; $this->setColumnsTranslations(array('goal_%s_conversion_rate' => '%s conversion rate', 'goal_%s_nb_conversions' => '%s conversions', 'goal_%s_revenue_per_visit' => '%s revenue per visit', 'nb_conversions' => Piwik_Translate('Goals_ColumnConversions'), 'conversion_rate' => Piwik_Translate('General_ColumnConversionRate'), 'revenue' => Piwik_Translate('Goals_ColumnRevenue'), 'revenue_per_visit' => Piwik_Translate('General_ColumnValuePerVisit'))); $this->setColumnsToDisplay(array('label', 'nb_visits', 'goal_%s_nb_conversions', 'goal_%s_conversion_rate', 'goal_%s_revenue_per_visit', 'conversion_rate', 'revenue_per_visit')); // We ensure that the 'Sort by' column is actually displayed in the table // eg. most daily reports sort by nb_uniq_visitors but this column is not displayed in the Goals table $columnsToDisplay = $this->getColumnsToDisplay(); $columnToSortBy = $this->getSortedColumn(); if (!in_array($columnToSortBy, $columnsToDisplay)) { $this->setSortedColumn('nb_visits', 'desc'); } parent::main(); }
public function main() { $this->viewProperties['show_exclude_low_population'] = true; parent::main(); }
public function main() { $this->idSite = Piwik_Common::getRequestVar('idSite', null, 'int'); $this->processOnlyIdGoal = Piwik_Common::getRequestVar('filter_only_display_idgoal', 0, 'string'); $this->isEcommerce = $this->processOnlyIdGoal == Piwik_Archive::LABEL_ECOMMERCE_ORDER; $this->viewProperties['show_exclude_low_population'] = true; $this->viewProperties['show_goals'] = true; if (Piwik_Common::getRequestVar('documentationForGoalsPage', 0, 'int') == 1) { $this->setReportDocumentation(Piwik_Translate('Goals_ConversionByTypeReportDocumentation', array('<br />', '<br />', '<a href="http://piwik.org/docs/tracking-goals-web-analytics/" target="_blank">', '</a>'))); } $this->setMetricDocumentation('nb_visits', Piwik_Translate('Goals_ColumnVisits')); if($this->isEcommerce) { $this->setMetricDocumentation('revenue_per_visit', Piwik_Translate('Goals_ColumnRevenuePerVisitDocumentation', Piwik_Translate('General_EcommerceOrders') )); $this->setColumnsTranslations( array( 'goal_%s_conversion_rate' => Piwik_Translate('Goals_ConversionRate'), 'goal_%s_nb_conversions' => Piwik_Translate('General_EcommerceOrders'), 'goal_%s_revenue' => Piwik_Translate('General_TotalRevenue'), 'goal_%s_revenue_per_visit' => Piwik_Translate('General_ColumnValuePerVisit'), 'goal_%s_avg_order_revenue' => Piwik_Translate('General_AverageOrderValue'), 'goal_%s_items' => Piwik_Translate('General_PurchasedProducts'), )); $this->setColumnsToDisplay( array( 'label', 'nb_visits', 'goal_%s_nb_conversions', 'goal_%s_revenue', 'goal_%s_conversion_rate', 'goal_%s_avg_order_revenue', 'goal_%s_items', 'goal_%s_revenue_per_visit', )); } else { $this->setMetricDocumentation('revenue_per_visit', Piwik_Translate('Goals_ColumnRevenuePerVisitDocumentation', Piwik_Translate('Goals_EcommerceAndGoalsMenu') )); $this->setColumnsTranslations( array( 'goal_%s_conversion_rate' => Piwik_Translate('Goals_ConversionRate'), 'goal_%s_nb_conversions' => Piwik_Translate('Goals_Conversions'), 'goal_%s_revenue_per_visit' => '%s ' . Piwik_Translate('General_ColumnValuePerVisit'), 'nb_conversions' => Piwik_Translate('Goals_ColumnConversions'), 'conversion_rate' => Piwik_Translate('General_ColumnConversionRate'), 'revenue' => Piwik_Translate('Goals_ColumnRevenue'), 'revenue_per_visit' => Piwik_Translate('General_ColumnValuePerVisit'), )); $this->setColumnsToDisplay( array( 'label', 'nb_visits', 'goal_%s_nb_conversions', 'goal_%s_conversion_rate', 'goal_%s_revenue_per_visit', 'revenue_per_visit', )); } // We ensure that the 'Sort by' column is actually displayed in the table // eg. most daily reports sort by nb_uniq_visitors but this column is not displayed in the Goals table $columnsToDisplay = $this->getColumnsToDisplay(); $columnToSortBy = $this->getSortedColumn(); if(!in_array($columnToSortBy, $columnsToDisplay)) { $this->setSortedColumn('nb_visits', 'desc'); } parent::main(); }