ckan / ckanext-googleanalytics

CKAN extension to integrate Google Analytics data into CKAN. Gives download stats on package pages, list of most popular packages, etc.
GNU Affero General Public License v3.0
35 stars 81 forks source link

Fix a bug introduced in #25 #27

Closed insertjokehere closed 7 years ago

insertjokehere commented 7 years ago

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

I also tried using {{h.dump_json(googleanalytics_fields)|safe}} and loading that in using JSON.parse, but h.dump_json seems to return invalid JSON when used in a template

camfindlay commented 7 years ago

:+1:

camfindlay commented 7 years ago

Should this be a 2.1.1 release then? Non-breaking new feature introduced + bug fix.

smotornyuk commented 7 years ago

In that case we will end up with v3 too soon. Currently there is small stack of issues and one interesting pull request(unfortunately, without descrtiption, but this change will be quite useful after work finished), so let's at least wait for few more additions