diff options
author | sgiehl <stefan@piwik.org> | 2016-03-23 01:15:21 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2016-03-29 23:49:03 +0300 |
commit | 6a5d6728793b0d758d2ae2c1f6d5da690782c49f (patch) | |
tree | 75fcad8ac332485b7b53f042b1ce2d9ff116eda0 /plugins | |
parent | a4c0f65f0ca93ee3c1ac6633a8bead7965998bc3 (diff) |
Display message why no reports are shown if there are no conversions
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Goals/lang/en.json | 1 | ||||
-rw-r--r-- | plugins/Goals/templates/getGoalReportView.twig | 16 | ||||
-rw-r--r-- | plugins/Goals/templates/getOverviewView.twig | 6 |
3 files changed, 14 insertions, 9 deletions
diff --git a/plugins/Goals/lang/en.json b/plugins/Goals/lang/en.json index dc485c94d8..4aefc3e34b 100644 --- a/plugins/Goals/lang/en.json +++ b/plugins/Goals/lang/en.json @@ -77,6 +77,7 @@ "NewGoalIntro": "Goal Conversion tracking is one of the most efficient ways to measure and improve your business objectives.", "NewVisitorsConversionRateIs": "New visitors conversion rate is %s", "NoGoalsNeedAccess": "Only an Administrator or a user with Super User access can manage Goals for a given website. Please ask your Piwik administrator to set up a Goal for your website. <br>Tracking Goals is a great way to help understand and maximize your website performance!", + "NoConversionsNoReportsMessage": "Reports are not displayed because there is no conversion data for the selected goal and period.", "NeedAccess": "Only an Administrator or a user with Super User access can manage Goals for a given website.", "Optional": "(optional)", "OverallConversionRate": "%s overall conversion rate (visits with a completed goal)", diff --git a/plugins/Goals/templates/getGoalReportView.twig b/plugins/Goals/templates/getGoalReportView.twig index 3d69cb3f5b..411b7277b0 100644 --- a/plugins/Goals/templates/getGoalReportView.twig +++ b/plugins/Goals/templates/getGoalReportView.twig @@ -57,14 +57,16 @@ </script> {% if displayFullReport %} + <h2 id='titleGoalsByDimension'> + {% if idGoal is defined %} + {{ 'Goals_GoalConversionsBy'|translate(goalName) }} + {% else %} + {{ 'Goals_ConversionsOverviewBy'|translate }} + {% endif %} + </h2> {% if nb_conversions > 0 or cart_nb_conversions is defined %} - <h2 id='titleGoalsByDimension'> - {% if idGoal is defined %} - {{ 'Goals_GoalConversionsBy'|translate(goalName) }} - {% else %} - {{ 'Goals_ConversionsOverviewBy'|translate }} - {% endif %} - </h2> {{ goalReportsByDimension|raw }} + {% else %} + <p class="alert">{{ 'Goals_NoConversionsNoReportsMessage'|translate }}</p> {% endif %} {% endif %} diff --git a/plugins/Goals/templates/getOverviewView.twig b/plugins/Goals/templates/getOverviewView.twig index ce828a8b54..2581742441 100644 --- a/plugins/Goals/templates/getOverviewView.twig +++ b/plugins/Goals/templates/getOverviewView.twig @@ -45,7 +45,6 @@ {% endfor %} {% if displayFullReport %} - {% if sum_nb_conversions != 0 %} <h2 id='titleGoalsByDimension'> {% if idGoal is defined %} {{ 'Goals_GoalConversionsBy'|translate(goalName) }} @@ -53,6 +52,9 @@ {{ 'Goals_ConversionsOverviewBy'|translate }} {% endif %} </h2> - {{ goalReportsByDimension|raw }} + {% if sum_nb_conversions != 0 %} + {{ goalReportsByDimension|raw }} + {% else %} + <p class="alert">{{ 'Goals_NoConversionsNoReportsMessage'|translate }}</p> {% endif %} {% endif %} |