[GA4] Troubleshoot tag setup on your website

Identify and fix issues with your tag setup that prevent you from seeing data in Google Analytics

You may not see data from your website in Google Analytics for the following reasons:

The measurement code is not installed on your website

You can install Google Analytics on your website using the Google tag (gtag.js) or Google Tag Manager. Depending on the option you choose, you need to add one or two snippets of code to each page of your website. Learn how to install the measurement code

Note: If you use a content management system or website builder that requires you to use a UA ID (legacy), see Set up Analytics for a CMS-hosted website.

The measurement code is installed incorrectly

The following are possible reasons why your code might be installed incorrectly:

Google tag (gtag.js)

The Google tag snippet is in the wrong place

Make sure you add your Google tag after the opening <head> HTML tag in your website code.

You also need to make sure you add the snippet to each page of your website. Google Analytics only collects data from your website pages that include the snippet.

An animation that demonstrates how to install the Google site tag for conversion tracking in Google Ads.

The Google tag ID is incorrect

To find the correct Google tag ID:
  1. Click Data Streams and then select the web data stream for the website.
  2. In the Stream details section, copy the Measurement ID.

The Measurement ID in the Stream details section must be the same ID in your Google tag:

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=Measurement-ID"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'Measurement-ID');
</script>

The Google tag contains extra whitespaces or characters

Copy the tag snippet from Google Analytics and paste it directly into your website code using either a text editor or an editor that preserves code formatting.
Avoid using a word processor to copy the tag from your account. Doing so can add an extra space or change the quotation marks in the tag. The tag requires precise formatting for it to work correctly.

Tag Manager

For more information about troubleshooting your Tag Manager setup, see Troubleshoot issues.

The Tag Manager snippets are in the wrong places

Make sure you add the first Tag Manager snippet as high in the <head> of the page as possible in your website code and the second snippet immediately after the opening <body> tag.

You also need to make sure you add the snippets to each page of your website. Google Analytics only collects data from your website pages that include the snippets. Learn more

The Google tag ID is incorrect

To find the correct Google tag ID:
  1. Click Data Streams and then select the web data stream for the website.
  2. In the Stream details section, copy the Measurement ID.

The Measurement ID in the Stream details section must be the same ID in your GA4 Configuration tag.

The GA4 Configuration tag has not been configured

In addition to installing the Tag Manager snippets, you need to configure the GA4 Configuration tag when you use Tag Manager to set up Google Analytics. Learn more about the GA4 Configuration tag

The GA4 Configuration tag does not have a trigger condition

The GA4 Configuration tag must have a trigger condition, which is usually configured for when the page loads. Learn more about trigger conditions

The Tag Manager and Google tag snippets are both installed

You should only use either the Google tag or Tag Manager, not both. Using both methods will have unintended consequences, such as overcounting data from your website. If you've installed both the Tag Manager snippets and the Google tag snippet, remove the snippets for one of these implementation options.

The Tag Manager changes have not been published

After you configure the GA4 Configuration tag, make sure to publish your changes by clicking Submit in Tag Manager. Otherwise, you won't see data in Google Analytics.

Your website has not received any traffic

If you just installed Google Analytics for the first time, and you don't see any data coming in, it may be that you don't have traffic on your website to display in your reports. Try clicking around on the website and then wait about a minute to see if those clicks populate in the Realtime report.

Your data is not yet processed

The Realtime report shows you data as people use your website. If you just installed Google Analytics for the first time, you will need to wait up to 24 hours for Google Analytics to process the data from your website and then display the data in the Realtime report.

Additionally, when you don't have a lot of users on your website, Analytics may apply thresholds to protect the identity of individual users. You can check if a threshold has been applied along the top of a report. Learn more about thresholds

Was this helpful?

How can we improve it?
false
Search
Clear search
Close search
Google apps
Main menu
12919547801635548466