Jump Links

Does my website have google analytics?

Back Posted on 01 Feb 2015

Two ways to find if Google Analytics is installed on your website

One of my clients attended a Google Analytics training seminar organised by the local Chamber of Commerce.  Those attending were given instructions to check if Google Analytics was already installed on their website however this method doesn't always work.

The way that doesn't always work

  1. Open your website
  2. Right click a blank area of the page
  3. Select View page source
  4. Search the code for the characters: UA-
    If this is found, followed by a series of numbers eg. UA-1234567-89 (the unique account number associated with your website) then Google Analytics is installed.  The full block of code looks like this:

In this case my client didn't find the UA- characters and believed Google Analytics was not installed on their website.  However Google Analytics was installed on the website.

The reason the UA- search failed is because I don't embed the Analytics code on the page.  This is to minimise the amount of data the page has to transfer to the user (less data is faster which is better for users).  Instead the Analytics code is stored in an external file.

To throw a further twist into the mix, you won't see the external file in the page source as I defer including it until the page has loaded (another technique to minimise data transfer and page load time).

The definitive way to tell if Google Analytics is installed on your website

If Google analytics is installed on your website it will instruct your browser to download a file called ga.js from www.google-analytics.com.

If you see this file being loaded then you have Google Analytics.

It is easy to check if Google Analytics is installed by using any modern browser which offers a Developer Tools panel.

Using Developer Tools you can access a list of all the files used by the current web page.  To find out if Google Analytics is iinstalled on yur website you need to see if ga.js is loaded.

The Developer Tools panel in Chrome, Firefox and Internet Explorer is accessed by pressing F12 on PC or Cmd + Opt + I on Mac (that's I for Indigo).  

Chrome

  1. Press F12 to open the Developer Tools panel
  2. Press F5 to reload the page (the panel only shows network traffic that occurs after it is opened)
  3. Select the Sources tab
  4. Look for www.google-analytics.com in the list
  5. Double click to expand the list
  6. If you see an entry for ga.js Google Analytics is definitely installed on your websiite

Firefox

  1. Press F12 to open the Developer Tools panel
  2. Press F5 to reload the page (the panel only shows network traffic that occurs after it is opened)
  3. Select the Net tab, then the Javascript tab
  4. Look for www.google-analytics.com in the Domain column
  5. If you see an entry for ga.js in the corresponding URL column Google Analytics is definitely installed on your website

Related resources

Here's what Google has to say if you want to check if a web page uses Analytics.