Stay organized with collections Save and categorize content based on your preferences.
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
This page explains how to set up and deploy a Google tag on your site using the gtag.js framework. If you're unfamiliar with javascript, we recommend using Google Tag Manager instead of gtag.js.
BenefitsThe 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:
To collect data with the Google tag:
Open a Google product you use and access the Google tag screen. How to find your tag ID in:
Copy your Google tag ID.
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 (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>
The config
command is needed to send data to Google advertisement products. Many features require the config
command to be set on your website, such as automatically collected events and conversion linking. Learn more about the config command
To verify that your tag is sending data:
When you connect Tag Assistant to your website, check if your Google tag ID appears in the header Google tags found. If Tag Assistant doesn't recognize your tag, find debug tips in the Tag Manager help center
You can also access the tag coverage summary for an overview of your site's tagging status.
Next stepsNow that you've set up your Google tag, configure Google products and send event data.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-04 UTC."],[[["The Google tag is a versatile tag that streamlines the use of various Google products like Google Ads and Analytics, replacing the need for multiple individual tags."],["Implementing the Google tag offers benefits like future-proof conversion measurement, codeless tag management, easier integration with other Google products, and more accurate conversion tracking."],["To use the Google tag, copy your tag ID from a Google product (e.g., Google Ads, Analytics), paste it into the provided code snippet, and place the snippet on every page you want to track."],["Verify your Google tag implementation using Tag Assistant to ensure it's sending data correctly by checking for your tag ID and consulting the Tag Manager help center for troubleshooting."]]],["The Google tag, a single tag for Google measurement and advertising products, can be implemented across an entire website via the gtag.js framework. To set up, users need to locate their Google tag ID within Google Ads, Analytics, or Floodlight, copy it, and paste it into the provided code snippet within the `\u003chead\u003e` of each web page. Verification involves using Tag Assistant to confirm tag detection and to ensure data is being sent. Once confirmed, the tag must be configured with the config command.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3