From 419b316962323c779f2e200bb6825d98aac82efb Mon Sep 17 00:00:00 2001 From: mattpiwik Date: Tue, 27 Sep 2011 08:09:10 +0000 Subject: [PATCH] Fixes #2664 * Sort goal table by conversion desc by default (instead of visits) * Add "Goal" introduction text (in hardcoded english but maybe could be translated (is everybody happy with the help text?) git-svn-id: http://dev.piwik.org/svn/trunk@5236 59fd770c-687e-43c8-a1e3-f5a4ff64c105 --- core/ViewDataTable/HtmlTable/Goals.php | 8 +++++++- lang/en.php | 2 +- plugins/Goals/templates/add_edit_goal.tpl | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/ViewDataTable/HtmlTable/Goals.php b/core/ViewDataTable/HtmlTable/Goals.php index 682d9f55aaa..3f392381355 100644 --- a/core/ViewDataTable/HtmlTable/Goals.php +++ b/core/ViewDataTable/HtmlTable/Goals.php @@ -78,7 +78,6 @@ public function main() 'goal_%s_nb_conversions', 'goal_%s_conversion_rate', 'goal_%s_revenue_per_visit', - 'revenue_per_visit', )); } @@ -91,6 +90,13 @@ public function main() { $this->setSortedColumn('nb_visits', 'desc'); } + + $columnNbConversionsCurrentGoal = $columnsToDisplay[2]; + if($this->processOnlyIdGoal > 0 + && strpos($columnNbConversionsCurrentGoal, '_nb_conversions') !== false) + { + $this->setSortedColumn($columnNbConversionsCurrentGoal, 'desc'); + } parent::main(); } diff --git a/lang/en.php b/lang/en.php index dc56eac3b0b..3506f176de2 100644 --- a/lang/en.php +++ b/lang/en.php @@ -647,7 +647,7 @@ 'Goals_CaseSensitive' => 'Case sensitive match', 'Goals_Pattern' => 'Pattern', 'Goals_ExceptionInvalidMatchingString' => 'If you choose \'exact match\', the matching string must be a URL starting with %s. For example, \'%s\'.', - 'Goals_LearnMoreAboutGoalTrackingDocumentation' => 'Learn more about %s Tracking Goals in Piwik%s in the user documentation.', + 'Goals_LearnMoreAboutGoalTrackingDocumentation' => 'Learn more about %s Tracking Goals in Piwik%s in the user documentation, or create a Goal now!', 'Goals_ProductSKU' => 'Product SKU', 'Goals_ProductName' => 'Product Name', 'Goals_ProductCategory' => 'Product Category', diff --git a/plugins/Goals/templates/add_edit_goal.tpl b/plugins/Goals/templates/add_edit_goal.tpl index cd7fab8c37f..d11e1f4d54a 100644 --- a/plugins/Goals/templates/add_edit_goal.tpl +++ b/plugins/Goals/templates/add_edit_goal.tpl @@ -1,5 +1,8 @@ {if isset($onlyShowAddNewGoal)}

{'Goals_AddNewGoal'|translate}

+

Goal Conversion tracking is one of the most efficient ways to measure and improve your business objectives.

+

A Goal in Piwik is your strategy, your priority, and can entail many things: "Downloaded brochure", "Registered newsletter", "Visited page services.html", etc. What do you want your users to do on your website? + You will be able to view and analyse your performance for each Goal, and learn how to increase conversions, conversion rates and revenue per visit.

{'Goals_LearnMoreAboutGoalTrackingDocumentation'|translate:"":""}

{else}