Visitor Tracking with Google Analytics

The best way to track visitors to your T4 site is through Google Analytics  This allows you to track where (country, city, website) visitors came from as well as what kind of device they were using, how long they stayed on your site and which are your most popular pages.

Note that it’s only possible to do this once your site has been made live (moved from a dev-research/something address to just research.ncl.ac.uk/something)

A tutorial on google anaytics is out of scope for this blog – there are plenty elsewhere, but here’s how to set it up within your T4 site:

Firstly, get an account: http://www.google.com/analytics/

google-analytics-1-getaccount

…and enter the website Name and URL that you wish to track:

google-analytics-2-choosesite

 

This will give you a Tracking ID and some code:

google-analytics-3-trackingid

Copy this code (CTRL+C), as we’ll need it later.

Return to T4 and click ‘Add Content’ to your Section Footer. You’ll have the option to add a content type called ‘Raw HTML/Javascript’

This content type needs a name (“Google Analytics” is as good a name as any) and also gives you a box to paste in the code from above (CTRL+V).

Click “Update and Approve” and then next time your site publishes, the Google tracking code will appear in the footer of every page and Google Analytics can start tracking your site.

This may take a few hours, but once it’s working you’ll be able to return to Google Analytics and see the real time tracking working on your site:

google-analytics-6-live

 

 

 

2 thoughts on “Visitor Tracking with Google Analytics

  1. Hi Paul and anyone else.

    I’m doing a ‘Getting the most out of Google Analytics’ course in November. I would be happy to share some of the basics, prehaps I could write a post for the blog?

    Thanks
    Lisa

Leave a Reply