Fix a bug introduced in #25

Setting a googleanalytics_fields key to `True` as in #25 causes the
resulting Javascript to also include the literal `True`, which is not
valid. This works around that by setting the key to `'true'` which
when evaluated in an if statement is truthy, serving the same purpose
This commit is contained in:
William Hughes 2017-02-09 16:23:31 +13:00
parent 8e36a4fcd2
commit 812b6e6098
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class GoogleAnalyticsPlugin(p.SingletonPlugin):
'googleanalytics.linked_domains', ''
).split(',')]
if self.googleanalytics_linked_domains:
self.googleanalytics_fields['allowLinker'] = True
self.googleanalytics_fields['allowLinker'] = 'true'
self.googleanalytics_javascript_url = h.url_for_static(
'/scripts/ckanext-googleanalytics.js')