User Tools

Site Tools


en:user_advanced:google_analytics

This is an old revision of the document!


Using Google Analytics

Here are just some notes I am making as I try to work out how to use this.

It seems that you sign up to google analytics with your google account.

Then you can add websites to be analysed.

Useful website: https://moz.com/blog/absolute-beginners-guide-to-google-analytics

You add analytics account - you can have more than one. Eg we have New Zealand Digital Library account.

Inside your account, you can have lots of properties, which are websites.

Once you set up a property for a website, you get a snippet of code which goes into the head of all the pages in that website that need tracking. The code is common to all pages apart from the ID, which is unique to a property. In the following example, I have put UA-xxx as a substitute for the tracking ID.

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxx"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-xxx');
</script>
en/user_advanced/google_analytics.1533590724.txt.gz · Last modified: 2018/08/06 21:25 by kjdon