Add Google Analytics to iShare Maps

Overview

You want to analyse the number of visitors to your iShare Maps website using Google Analytics (GA). Firstly, you would need to have an active GA Account Number (e.g. 'UA-XXXXX-X'). Once you have this you then need to embed it into your atMyCouncil.aspx page, or whatever you have called your page.

If you require any assistance with this then Astun could look at doing this for you using prepaid subscription time e.g. your OEA time (approx 1 hour), but we would need to know your GA Account Number.

Step-by-step guide

  • Open your atMyCouncil.aspx page in a text editor such as Notepad++
  • Add the following into the <head> section, replacing 'UA-XXXXX-X' as the setAccount value with your GA Account Number.
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
  • Save your changes.