How to set up and install Google Analytics

Google Analytics only begins tracking website activity from the moment it is successfully installed onwards, it is unable to track data from before its installation, so it is worthwhile to set up Google Analytics for your website as soon as possible upon launching your website.

Also, Google Analytics tracking code can be moved between websites, so if you build a new version of your website, you can simply move the tracking code from the old to new website when you launch, for a single look at how each site has performed.

Try to think of your tracking code as “belonging” to a particular website domain, rather than to a particular iteration of your website.

There are three important steps to successfully setting up your Google Analytics account:

  1. Create the Google Analytics account and/or Property tracking code for your website
  2. Install the tracking code on every page of your website that you want to be tracked
  3. Verify that tracking is working

If you do not complete step 2, you will see no data in your Google Analytics account.

1. Create the Google Analytics account and/or Property tracking code for your website

To set up and use Google Analytics, you need a Google account. Any email address can be used to create a Google account. It does not have to be a Gmail or Google email account.

We recommend using an email address you use regularly, and know the password, as it is much easier for any future verification situations. You can add extra users to your Google Analytics account, using their Google email address (see more in the Users and Permissions section).

  1. Visit:
  2. Click “Start for free”
  3. Sign in with your existing Google account, or create a new Google account (click “Create account”)
  4. Follow the prompts to set up your new account, including giving it a name, and adding your website domain (these can be edited later)
  5. Locate your tracking code in the Property area of the Admin section (more about these areas in the “How to best structure your Google Analytics account” section).

Every Google Analytics Property has its own unique Tracking ID. This now needs to be installed on your website.

2. Install the tracking code on every page of your website that you want to be tracked

Thankfully, modern websites make this much easier than in sounds, with most current content management systems (CMS) providing ONE PLACE to add either your Tracking ID (UA-XXXXXXXX-X) or the Global Site Tag (which includes your unique Tracking ID), which automagically adds to to the <head> tag of every page of your website.

If you are not confident with editing your website, you may need to request the assistance of a developer or someone who has experience with Google Analytics installation to assist you.

Google Analytics installation for WordPress websites:

  1. Some WordPress website themes provide a field to add your Tracking ID, often in the Theme settings. This can vary between themes, so you will need to review yours to see if this is an option. Otherwise you can try:
  2. Monster Insights plugin (this plugin also features a basic overview of key Google Analytics reports within your WordPress admin interface, free version is adequate).
  3. Install and use a header and footer code plugin, which allows you to create a new “head” tag for the Global Site Tag

Google Analytics installation for Squarespace websites.

Google Analytics installation for Shopify websites.

Google Analytics installation for Wix websites.

Google Analytics installation for Weebly websites.

For other content management systems, we recommend googling: “{content management system name} google analytics installation”to find the steps.

You can also install Google Analytics via Google Tag Manager.

3. Verify Google Analytics is tracking correctly

Once installed, return to your Google Analytics account and login.

If you have only just performed the installation, you will likely see no data in the main reports, as these focus on historical data.

To track whether your code is working, visit the Real-Time report overview.

If you cannot see any activity, open a new browser window or tab and visit your own website.

If the tracking code is installed correctly, you have Javascript and cookies enabled in your browser, and you aren’t being filtered out for some reason, you should start to see some activity.

Click around a few pages on your website and watch the “Top Active Pages” change to confirm everything appears to be working.

Next lesson: Understanding the Google Analytics account structure