Jan 28, 2016

How to add Google Analytics to your Website

Hopefully you’ve decided to take the plunge and start using analytics to get some real insight into how your website is performing. With this in mind, we’ve put together a step-by-step guide on how to install Google Analytics on your website, using the most basic method – Universal Analytics.

Please note – you’ll need to have access to the header section of your website to do this – if you don’t have access, send the tracking code (available at the end) on to your developer to add in.

1. Create a Google Account if you don’t already have one.

Go to the Google Account creation page and fill in the details.

Go to the Google Account creation page and fill in the details

2. Go to Google Analytics

3. Click the Sign up button.

Click the Sign up button

4. Start filling in the fields as required.

Under New Account, the default selected is Website – this is fine.

Under Account Name, add in your top-level business name. If you’re running a franchise, for example, add in the franchise name. You can add extra properties for individual stores later on.

Under Website Name, add in your site’s name – usually the business name again.

Under Website URL, often it’s easier to copy and paste your URL (e.g. http://www.yourbusinessname.com.au) from your home page. Make sure there’s no /index.html or similar at the end of the URL.

Select your industry from the Industry Category drop down box.

Change the reporting time zone to your time zone.

You can leave all the checkboxes ticked for the data sharing.

Start filling in the Google Analytics fields as required

5. Click Get Tracking ID

Click Get Tracking ID

It will ask you to accept Terms of Service. Change the Terms to Australia (or as relevant), and click to accept.

Your account is now officially created.

If you’re using WordPress or similar, you’ll need to have a look on their website to see how they want the tracking code inserted.

For all other sites, keep reading.

6. Make a copy of your website’s header file.

7. Open the original of the header file, and copy and paste the tracking code you’ll see on the Google Analytics page just before the closing </head> tag.

Copy and paste the tracking code you?ll see on the Google Analytics page

7. Add in one line of code to the tracking code to make sure you’re recording demographics (your users’ ages, gender, in-market information, etc).

Between these two lines of code:

ga('create', 'UA-72991631-1', 'auto')
ga('send', 'pageview');

Add in this line:

ga('require', 'displayfeatures');

So your full code should look like this:

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  ga('create', 'UA-72991631-1', 'bwired.com.au');
  ga('require', 'displayfeatures');
  ga('send', 'pageview');

(bold for emphasis only)

8. Upload your header file to the live site.

9. Back in Google Analytics, you’ll need to enable the demographics and interest reports. To do this, go to Reporting from the top header, then choose Audience > Demographics > Overview. Click the blue ‘Enable’ button.

You?ll need to enable the demographics and interest reports

10. Test that your tracking code is working by going back to the Admin section, and clicking Tracking Info from the second (property) column. Click Tracking code.

Click Send test traffic, and you should receive a success message.

Click Send test traffic, and you should receive a success message.

All too much? Contact bwired to enquire about costs on installing tracking for you.

Leave a comment