To the list of all articles

7 ways to check the presence of Google Analytics on the site

#Google Ads
10/16/2023
197
7 ways to check the presence of Google Analytics on the site

When getting acquainted with a new project, there is often a need to check the presence of Google Analytics on the site. Let's consider several ways to choose the most suitable for you.

1. Ask the client

Despite its banality, the first method should be used as a priority. If the analytics is installed using the standard method, you can easily confirm this fact in one of the ways below. However there are specific methods for installing analytics on the server side, and the methods described below will indicate the absence of Google Analytics on the site. So, for complete certainty, we ask a question.

2. Tag Assistant

Probably familiar to many and quite an easy-to-use browser extension that allows you to view the tags installed on the site in a couple of clicks.

Follow the link to install. After installation and activation, the icon will appear in the list of extensions:

Tag Assistant Legacy extension

Click on it, and in the window that opens, click the button to activate the extension:

Activation of the Tag Assistant Legacy extension

Refresh the page and open the extension again. If analytics is installed through GTAG or the Google Tag Manager tag (hereinafter GTM), we can see the presence of analytics on the site:

Google Analytics validation via the Tag Assistant Legacy extension

It is important to note that after the global transition to GA4, the word “Legacy” was added to the name of the extension, which may indicate that at some point, the extension may stop working.

3. View page source

Another common way is to go to the page code view. By clicking the right mouse button, select the “View page source” item in the context menu:

Google Analytics verification via site code

Now, after opening the text search window with the key combination Ctrl+F (Command+F for Mac), enter the following words one by one:

  • gtag.js - if you find this, the site uses GTAG. Looking at the code snippet between the <script> and </script> tags, you need to find the Analytics ID. If it looks like UA-XXXXXXX-X, the previous analysis protocol, called GA3, is used. If we see the "data flow identifier", which has the form G-XXXXXXX - GA4 is installed
  • analytics.js - if we find such a word, it means Universal Analytics installed on the site
  • gtm.js - many specialists use Google Tag Manager to connect analytics to the site. Therefore, if neither gtag.js nor analytics.js can be found, we look for gtm.js. In this case, to understand the presence of analytics, access to GTM is already required, and already in the interface, we will be able to check the presence of the tag, as well as check its correct operation through the preview. Please note that the GA4 configuration has changed and now uses the Google Tag instead of the now disabled Google Analytics: GA4 Configuration tag. You can learn about the nuances here

4. Checking other files on the site

There are cases when searching for code fragments through the "View Page Source" function does not give results. Try continuing your search in developer tools. In Google Chrome, the tool is called by the F12 key (or Option + Cmd + J on a Mac). Go to the “Source” tab and use the keyboard shortcut Ctrl+Shift+F (or Option + Cmd + F for Mac). This function will allow you to search all files uploaded to the site, including JavaScript files. We enter in the search the same words that we used in the previous point, namely gtag.js, analytics.js, gtm.js. Keep in mind that with this search, you are only interested in the files specifying your site's domain since various related scripts may also have the following fragments:

Checking the connection of analytics services from Google in the page code
 

5. Network tab in developer tools

We repeat the actions from the previous point, namely, call the developer tools with the F12 key (or Option + Cmd + J on Mac). Go to the "Network" tab. Here, you can see a list of requests received from the site, including Google Analytics requests. In the search field, enter the word "collect" and reload the page.

Checking Google Analitycs through the site code Network tab

As a result, you can see the requests. As you can see from the screenshot below, we have a request that starts with collect?v=2

Checking Google Analitycs through the site code Network tab

This indicates that GA4 is installed on the site. You can also see the data stream ID below. If we see a request that begins with collect?v=1, this will indicate that Universal Analytics is installed.

6. GA Debugger

One more useful browser extension. If it is not installed yet, go here. While on the site, activate the extension. The page will reload, and the “ON” icon will appear on the extension logo:

GA Debugger

Now open the familiar “Developer Tools,” go to the “Console” and clear it using the button on the screen:

Cleaning the console in GA Debugger

Now we update the page. If we see something like this, the GA Debugger found analytics on the site:

GA Debugger search Google Analytics
 

7. Cookies

If Google Analytics is installed on the site, it leaves several so-called cookies. Again, open "Developer Tools" and go to the "Applications" tab, and find the Cookies section in the list on the left: 

Checking Google Analytics via Cookies

Select your domain in the list that opens and write "_ga" in the search field: 

Checking Google Analytics via Cookies

Analytics is installed on the site if there is at least one cookie with your domain in the Domain column.

The author of the article

Serhii Popovych

Serhii Popovych

Google Ads Team Lead

Did you like the article? Share it

Link copied