How To Find Global Site Tag In Google Analytics

If you are new to analytics or have experience in the field, grasping the intricacies of Google Analytics can be challenging. One particular aspect that may be confusing is locating the Global Site Tag (gtag.js). Fortunately, this guide outlines easy steps to help you navigate through this task.

What is Global Site Tag (gtag.js)?

The Global Site Tag, also known as gtag.js, is a JavaScript tagging framework and API that allows you to send event data to Google Analytics, Google Ads, and Google Marketing Platform. It offers simplified and streamlined tagging across Google’s suite of products.

How to Find Your Global Site Tag in Google Analytics

Follow these simple steps to locate your gtag.js:

  1. Sign in to your Google Analytics account.
  2. Click Admin, and navigate to the appropriate property.
  3. In the PROPERTY column, click Tracking Info > Tracking Code.
  4. Your Global Site Tag (gtag.js) will be displayed at the top of the page.

Here is what you’re looking for:

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

        gtag('config', 'GA_TRACKING_ID');
    </script>
    

In the above script, replace ‘GA_TRACKING_ID’ with your unique Google Analytics Tracking ID. This ID will be in the format of ‘UA-000000-2’.

Where to Put Your Global Site Tag?

Once you have your Global Site Tag, you should place the entire tracking code (JavaScript) snippet at the top of every webpage you want to track. Ideally, you should place it immediately after the opening <head> tag on each page.

Conclusion

And there you have it! Now, you know how to locate your Global Site Tag and where to place it on your webpages for effective tracking with Google Analytics. This will ensure that you’re gathering all the necessary data to analyze and improve your website’s performance.