How to fix ‘Missing Tracking Code’ in Google Analytics

In this article, I am going to talk about how to fix missing tracking code notifications in Google Analytics.

Google Analytics notifications (diagnostic) is a feature of Google Analytics that makes regular evaluations of your Google Analytics tracking code, account configuration, and data to find implementation issues and configuration anomalies.

Once it finds an issue, it alerts the GA user through a special message known as a diagnostic notification (also known as a Google Analytics notification).

Now let’s see how to fix missing tracking code notifications in Google Analytics.

Overview

Google Analytics crawlers regularly check your website using their search crawler. It also checks for Google Analytics accounts associated with the website. The crawler has JavaScript enabled and when it executes the results are examined to confirm the presence of valid analytics tracking code. 

If the crawler does not find valid tracking code or if the code is missing on a few of the pages it will send you a “Missing tracking code notification” like the below image.

missing tracking code

If you get this notification then it could mean, some of the web pages on your website:

1.    Do not have the Google Analytics tracking code

2.    Have invalid tracking code

3.    Have valid tracking code but it is not firing for some reason

How to fix missing tracking code notifications in Google Analytics

To fix the missing tracking code notification, follow the below steps.

Step-1: Navigate to your Google Analytics account and then click on the bell icon

bell icon

Step-2: Click on the ‘Details’ link, to get more details and a possible solution about the identified implementation/configuration issue.

details

Google Analytics will show you the list of web pages that you need to inspect:

missing tracking code details

Step-3: Now copy the URL list and save it in Notepad, Word, or Excel for easy usage.

Step-4: Now paste any URL in the browser and hit enter.

Step-5: Once the webpage is loaded right click on the page and click on ‘View Page Source’.

view page source

Step-6: Now press ‘Control + F’ on your keyboard and enter your GA property ID.

Tracking code missing

As you can see from the above image, there are no results for the tracking code. This means Google Analytics tracking code is not placed and hence you are getting the missing tracking code notification.

Step-7: Now you can ask your developer team to install the valid tracking code on all the pages of the website.

Step-8: Now repeat the same steps for the remaining list of pages.

Step-9: Once you have implemented the code, click on the ‘Check again’ link in the notification.

check again

If Google diagnostics doesn’t find any tracking issue after the next crawl then you will see a notification that says the issue has been resolved:

resolved

Note: There is also a possibility that you still continue to see the ‘missing tracking code’ notification even after fixing the tracking issue.

GA can continue to show you this notification until it has re-examined all of the web pages with ‘missing tracking code’ issues.

How to fix invalid tracking code notifications in Google Analytics

Sometimes it may happen that you have your Google Analytics code installed on the website but still, Google Analytics is not working. This may happen if your webpage has invalid tracking code.

A nonstandard implementation of Google Analytics tracking code on some of the web pages on your website may also trigger the ‘invalid tracking code’ notification.

The best solution for such notification is to ensure that the Google Analytics web property ID in the Google Analytics JavaScript (analytics.js or gtag.js) on your page matches the Google Analytics web property ID generated in your Analytics website profile. 

Also, ensure that the Google Analytics account ID in the Google Analytics JavaScript on your page does not contain any extra or empty spaces.

Sometimes there is nothing wrong with your tracking code installation but you can still get this notification because of false positives. In that case, you can ignore this notification.

How to fix valid tracking code but not firing in Google Analytics

Sometimes it may also happen that you have valid tracking code but it’s not firing due to some reasons like other JavaScript conflicts with your Google Analytics Code.

If you are using Google Tag Manager, then it might be possible that your triggers are not set properly, in this case, your GTM container will load on the webpage but it won’t fire the Google Analytics tag.

Some of the pages on the website have standard implementation using Google’s recommended code and some of the pages use custom implementation. In such cases, you can get this notification.

Many times you will get a false positive notification (valid tracking code is implemented but still you get notification). In such cases, you can ignore the notification. 

The best solution for this is to check real-time reports. You can open an incognito window in the browser so that no extension blocks any script. Visit the page and see if it is shown in the real-time reports of GA.

If you can see the pageview for specific pages that you visit in real-time reports, everything is fine. But if you don’t see it, that means your configuration has some errors. In such cases, you can ask your developer team to look into the issue and rectify it.

Limitations of missing tracking code notification in Google Analytics

There are a few limitations of the notifications that you see in Google Analytics about missing tracking code.

One of them is that Google diagnostic crawls the web pages of your website as Googlebot.

It crawls those web pages of your website which get a significant amount of traffic and which are publicly available (not hidden behind a login or excluded via robots.txt file)

In other words, Google diagnostic cannot report on all of the implementation/configuration issues, if:

  1. Your website has got pages hidden by a login
  2. You have pages blocked by robots.txt file
  3. Your website is very big (tens of thousands of web pages)

Another limitation is that the frequency of the crawler is not predefined. Sometimes it may take a few days and sometimes it may take a few weeks as well. So keep in mind that recent tracking code changes or fixes may not be reflected in the results until the page is re-examined by Googlebot.

Note: GA does not always report all of the web pages that you need to look at, in order to save its computing power.

Moreover, GA cannot report tracking issues for the web pages which can’t be crawled/accessed because of login or robots.txt exclusion.

You are most likely to see only a sample of web pages that need fixing especially if your website is very big. So, you need to make sure that every web page on your website has got the correct Google Analytics tracking code installed and it fires on page load.

Frequently asked questions about how to fix missing tracking code notifications in Google Analytics

What are Google analytics goals notifications?

Google Analytics notifications (diagnostic) is a feature of Google Analytics that makes regular evaluations of your Google Analytics tracking code, account configuration, and data to find implementation issues and configuration anomalies.

Once it finds an issue, it alerts the GA user through a special message known as a diagnostic notification (also known as Google Analytics notifications).

Why am I seeing a ‘missing tracking code’ notification in Google Analytics?

Google Analytics crawlers regularly check your website using their search crawler. It also checks for Google Analytics accounts associated with the website.
If the crawler does not find valid tracking code or if the code is missing on a few of the pages it will send you a ‘missing tracking code’ notification. If you get this notification then it could mean that some of the web pages on your website:
1.    Do not have the Google Analytics tracking code
2.    Have invalid tracking code
3.    Have valid tracking code but it is not firing for some reason

How to fix missing tracking code notifications in Google Analytics?

Based on the reason for having missing tracking code notification in Google Analytics, you can fix it in the following ways

1. If your pages do not have tracking code then you can ask your developer team to install the valid tracking code on all the pages of the website.

2. If the issue is because of invalid tracking code, you can rectify if it is a non-standard analytics implementation. If yes, follow the standard process of Google Analytics implementation.

3. If you have valid tracking code but it is not firing for some reason, in such cases you can use real-time reports to verify. If the problem persists then check if your code configuration or tagging is correct or not. You can also check if any other JavaScript is creating conflict with your GA code.

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade
error: Alert: Content is protected !!