--- a/ckanext/ga_report/controller.py +++ b/ckanext/ga_report/controller.py @@ -309,6 +309,8 @@ select department_id, sum(pageviews::int) views, sum(visitors::int) visits from ga_url where department_id <> '' + and package_id <> '' + and url like '/dataset/%%' and period_name=%s group by department_id order by visits desc """