Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

Google Analytics on new NGDS server #630

Open
ccaudill opened this issue Jun 22, 2015 · 3 comments
Open

Google Analytics on new NGDS server #630

ccaudill opened this issue Jun 22, 2015 · 3 comments

Comments

@ccaudill
Copy link
Collaborator

https://github.com/ngds/ckanext-ngds/issues/383

@pjbarry21 Do you know if we can get Google Analytics for the new server on which NGDS runs?

@ccaudill ccaudill added this to the AZGS tasks milestone Jun 22, 2015
@pjbarry21
Copy link

It needs to be entered into the code in the site (I'd suggest the footer or header for search.geothermaldata.org -- that should place it on all the pages in that installation).

This code/account was used in the past (not sure in which version -- think the old CKAN that was up) and can be used now for this version of the site:

<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-33183150-2', 'auto'); ga('send', 'pageview'); </script>

@pjbarry21
Copy link

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-33183150-2', 'auto');
  ga('send', 'pageview');

</script>

@ccaudill
Copy link
Collaborator Author

Awesome, thanks @pjbarry21

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants