Changed to provide a lambda to check if the extension is installed
Changed to provide a lambda to check if the extension is installed

--- a/ckanext/ga_report/helpers.py
+++ b/ckanext/ga_report/helpers.py
@@ -33,6 +33,7 @@
     ctx = {
         'dataset_count': len(datasets),
         'datasets': results,
+
         'publisher': publisher
     }
 

--- a/ckanext/ga_report/plugin.py
+++ b/ckanext/ga_report/plugin.py
@@ -21,7 +21,8 @@
         """
         from ckanext.ga_report.helpers import most_popular_datasets
         return {
-            'most_popular_datasets': most_popular_datasets
+            'ga_report_installed': lambda: True,
+            'most_popular_datasets': most_popular_datasets,
         }
 
     def after_map(self, map):

--- a/ckanext/ga_report/templates/ga_report/publisher/popular.html
+++ b/ckanext/ga_report/templates/ga_report/publisher/popular.html
@@ -2,6 +2,10 @@
   xmlns:i18n="http://genshi.edgewall.org/i18n"
   xmlns:xi="http://www.w3.org/2001/XInclude"
   py:strip="">
+  <py:if test="dataset_count == 0">
+    <p>We do not currently have analytics data for ${publisher.title}</p>
+  </py:if>
+
   <py:if test="dataset_count > 0">
     <div class="popular_datasets">
         <ul class="popular_dataset_list">