Uncommenting needed code
--- a/ckanext/ga_report/download_analytics.py
+++ b/ckanext/ga_report/download_analytics.py
@@ -85,7 +85,7 @@
self.get_full_period_name(period_name, period_complete_day),
start_date.strftime('%Y %m %d'),
end_date.strftime('%Y %m %d'))
- """
+
data = self.download(start_date, end_date, '~/dataset/[a-z0-9-_]+')
log.info('Storing Dataset Analytics for period "%s"',
self.get_full_period_name(period_name, period_complete_day))
@@ -95,7 +95,7 @@
log.info('Storing Publisher Analytics for period "%s"',
self.get_full_period_name(period_name, period_complete_day))
self.store(period_name, period_complete_day, data,)
- """
+
ga_model.update_publisher_stats(period_name) # about 30 seconds.
self.sitewide_stats( period_name )
--- a/ckanext/ga_report/templates/ga_report/site/index.html
+++ b/ckanext/ga_report/templates/ga_report/site/index.html
@@ -8,6 +8,8 @@
<py:match path="primarysidebar">
<li class="widget-container boxed widget_text">
<h4>Statistics</h4>
+ <p>It is possible to <a href="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='csv',month=c.month)}">export the analytics data</a> as a CSV file, which contains all of the information for ${c.month_desc}</p>
+
</li>
</py:match>
@@ -24,8 +26,6 @@
<input class="btn button" type='submit' value="Update"/>
</div>
</form>
-
- <p><a href="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='csv',month=c.month)}">Export data</a> as CSV</p>
<div class="tabbable">
<ul class="nav nav-tabs">
--- a/setup.py
+++ b/setup.py
@@ -32,6 +32,7 @@
[paste.paster_command]
loadanalytics = ckanext.ga_report.command:LoadAnalytics
initdb = ckanext.ga_report.command:InitDB
+ getauthtoken = ckanext.ga_report.command:GetAuthToken
""",
)