How to Add Google Analytics to Your Site

How to add Google Analytics
How to add Google Analytics

Google Analytics is a useful tool for any marketeer to gain an understanding of how users and customers behave whilst browsing their website.

Here’s just a small overview of some of the information you can track:

  • How long users stay on your site and engage with your content
  • Where users drop off during the process (funnel) of completing an action on site, such as a sale or a newsletter sign up
  • How users arrived on your site, for example organically through a search engine or perhaps via a social channel
  • Search queries that landed that user on your site

Add Google Analytics: Step 1

Visit the Google Analytics website. If you already have a Google email address you will be able to sign in with that or be given the opportunity to register one.

GAHomepage
Google Analytics Homepage

Once you are in you will get asked to create an account name. You are able to have a maximum of 100 accounts once you get going.

Google Analytics Create Account
Create Google Analytics Account

Create an account name and hit next.

Step 2

Now you will be asked what you wish to measure, for example a website or a mobile app or both at once. In this tutorial we will select website. Hit next.

Setup
Measure your website

Step 3

Now you will be asked to create a name for the property you wish to install Analytics on, this is under website name.

Then provide the url of your website, if your website has an ssl certificate installed be sure to select https:// from the drop down.

Next select an industry category and a time zone.

It’s important to select the correct time zone for your reporting, so you can get a true reflection of your users for your desired time period.

Hit ‘Create’ once you have done.

Property Details
Setting up Google Analytics

You will now see your unique tracking ID and a code snippet for you to install on your website. Copy and paste this code as the first item into the <HEAD> of every web page that you want to track.

Tracking Code

Once you have installed your tracking code in the <head> of your site. You can test of the tracking is working by selecting ‘Real-time’ in the left hand side menu and click ‘Overview’. This shows active users on your site in real-time. Simply visit your website in a browser and you should see the active user counter go up.

Active Users

Installing Analytics on WordPress

If you are a WordPress user, there are many ways you can install this code snippet.

If you have a custom theme template and are confident with editing a theme file, you can add the code snippet in the head of your site, generally found in header.php.

Alternatively, you can use a GA plugin such as this one by Jeff Starr.

Once installed, visit the settings section of the plugin and and enter your GA Tracking ID and select the tracking method, the modern approach is using gtag.js.

An optional but useful checkbox to tick is this one:

This stops GA from tracking admins as they are managing the WordPress site, creating content etc. Ticking this box will tell GA to only track real users and not admins.

Hit save changes and voila!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *