> [!NOTE]
> **Note:** We recommend using [Google Tag Manager](https://developers.google.com/tag-platform/tag-manager) to set up and deploy tags on your site.

[Video](https://www.youtube.com/watch?v=H5dyrs84bIQ)

The Google tag is a single tag you can add to your website to use
Google measurement and advertising products like Google Ads, Google
Analytics, Campaign Manager, Display \& Video 360, and Search Ads 360. Instead of
managing multiple tags for different Google products, you can use the
Google tag across your entire site and connect the tag to multiple destinations.

[Learn more about the Google tag](https://support.google.com/tagmanager/answer/11994839)

This page explains how to set up and deploy a Google tag on your site using the
gtag.js framework.

## Benefits

The best way to measure conversions and optimize the value of your Google
marketing investment is to place tags on every page of your site. By
implementing the Google tag across your site, you gain access to the following
benefits:

- **Future-proof conversion measurement.** Benefit from the latest features and integrations as they become available so that you are better equipped to continue measuring conversions accurately if changes occur.
- **Codeless tag management.** Turn on measurement features within Google products without having to manually change the tags on your page.
- **Faster and easier integration.** Streamlined, simpler implementation and integration with other Google products, such as Analytics and Google Ads.
- **More accurate conversion measurement.** The Google tag helps you achieve more accurate conversion measurement when cookies are not available and recover conversions not observed today due to industry factors.

## Add the Google tag to your website

> [!NOTE]
> **Note:** We have upgraded all the Google tags (gtag.js) to include the capabilities of Google Tag Manager. Websites that only use gtag.js now have the ability to use the existing UI-driven tagging features, debugging, and version control that make GTM such a powerful tool.
>
> If you are installing a Google tag for the first time, we recommend using [Google Tag Manager](https://developers.google.com/tag-platform/tag-manager). Existing implementations will continue to be supported, and no action is needed.

To collect data with the Google tag:

1. Open a Google product you use and access the Google tag screen.
   How to find your tag ID in:

   - [Google Ads](https://ads.google.com/aw/tagsettings)
   - [Google Analytics](https://support.google.com/analytics/answer/9539598)
   - [Google Floodlight](https://support.google.com/sa360/answer/3027419)

   <br />

2. Copy your Google tag ID.

3. Paste your Google tag ID in the following code sample. Place the Google tag
   snippet immediately after the opening `<head>` HTML tag on every page you want
   to measure.

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

   > [!NOTE]
   > **Note:** The `gtag('config')` command is deprecated and no longer included in default installation snippets. Configure settings and destinations in the Google Tag Manager UI, or use `gtag('set')` for in-page parameters. Existing snippets containing `gtag('config')` will continue to work for backward compatibility. [Learn more](https://developers.google.com/tag-platform/gtagjs/reference#config).

## Verify the Google tag

To verify that your tag is sending data, you can use Tag Assistant or your
browser's developer tools.

### Verify with Tag Assistant

1. Go to [tagassistant.google.com/](https://tagassistant.google.com/).
2. Click **Add domain**.
3. Enter the URL of the website you want to debug, starting with "https://" or "http://".
4. Click **Connect**.

When you connect Tag Assistant to your website, check if your Google tag ID
appears in the **Google tags found** header. A green or blue icon indicates that
the tag was found and is working correctly.

If Tag Assistant doesn't recognize your tag, find debug tips in the
[Tag Manager help center](https://support.google.com/tagassistant/answer/10039345).

You can also access the [tag coverage summary](https://support.google.com/tagmanager/answer/12270036) for an overview of your site's
tagging status.

### Verify with browser developer tools

To verify that tags are firing on a page:

1. Open your website in Google Chrome.
2. Open Chrome Developer Tools (**View \> Developer \> Developer Tools**).
3. Open the **Network** tab.
4. Refresh the page.
5. If you see requests to `googletagmanager.com`, your tag is firing.

   You can further check your setup by looking for hits for specific Google
   products:
   - **Google Ads** : Filter for requests to `googleadservices.com` or `googlesyndication.com`.
   - **Google Analytics** : Filter for requests to `google-analytics.com` or `analytics.google.com`.
   - **Floodlight** : Filter for requests to `doubleclick.net`.

   If you don't see requests for a product you configured, it's possible that
   you only loaded the product with the `config` command but are not sending
   any events. Check if you are sending events for this product using the
   `event` command. For example, Google Analytics automatically sends a
   `page_view` event when the `config` command is called, unless you set
   `send_page_view` to `false`.

   If you still don't see any requests, check the Developer Tools **Console**
   for errors.

   > [!NOTE]
   > **Note:** If you use server-side tagging, check network requests on your tagging server instead of in the browser.

   For detailed debugging, use \[Tag Assistant\]\[vn_Tag_Assistant\].

   \[vn_Tag_Assistant\]: //tagassistant.google.com

For more detailed information about verifying your Google Analytics setup, identifying issues when data is not appearing, and understanding data processing timelines, see [Verify and troubleshoot your Google Analytics setup](https://developers.google.com/analytics/devguides/collection/ga4/troubleshoot).

## Next steps

Now that you've set up your Google tag, [configure Google products and send
event data](https://developers.google.com/tag-platform/gtagjs/configure).