cioos-siooc / ckan

CKAN is an open-source DMS (data management system) for powering data hubs and data portals. CKAN makes it easy to publish, share and use data. It powers datahub.io, catalog.data.gov and europeandataportal.eu/data/en/dataset among many other sites.
http://ckan.org/
Other
2 stars 4 forks source link

Remove ckanext-googleanalyticsbasic extension #145

Closed fostermh closed 1 year ago

fostermh commented 2 years ago

the ckanext-googleanalyticsbasic extension seems to be broken.

Given that we are not doing any customization to how analytics are collected on our site it may be simpler to remove the extension in favour of using the 'ckan.template_head_end' or 'ckan.template_footer_end' config settings. This is how SLGO and National are currently adding gtag.js. Atlantic and Pacific will also adopt this approach. Once all RA's are udpated we can drop the plugin.

and example ckan.ini config file entrie would be:

ckan.template_head_end = 
  <!-- Global site tag (gtag.js) - Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=FOO"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);} 
    gtag('js', new Date()); 
    gtag('config', 'FOO');
  </script>
fostermh commented 1 year ago

done