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:
parent
8e36a4fcd2
commit
812b6e6098
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue