How to Find Global Site Tag in Google Analytics

Cody Schneider8 min read

Looking for the Global Site Tag to connect your website to Google Analytics? You’re in the right place. This guide will show you exactly where to find your tracking code snippet in both Google Analytics 4 and the older Universal Analytics (UA), step by step.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What Exactly is the Global Site Tag (gtag.js)?

Before jumping into the "how," let's quickly cover the "what." The Global Site Tag, technically known as gtag.js, is a small piece of JavaScript code. Its job is simple: when someone visits your website, this tag loads in their browser and sends information about their activity — like what page they're on — over to your Google Analytics property.

Think of it as the foundational link between your website and your analytics report. Without it, Google Analytics has no way of knowing what’s happening on your site.

This single tag was developed by Google to streamline tracking across multiple products. Instead of needing one code for Google Analytics and another for Google Ads, the Global Site Tag acts as a central hub. You install it once on your site, and then you can configure it to send data to various Google services.

The code itself consists of two main parts:

  • A script that fetches the core gtag.js library.
  • A configuration snippet that connects that library to your unique Google Analytics property using a Measurement ID (for GA4) or a Tracking ID (for Universal Analytics).

Now, let's find that code.

How to Find Your Global Site Tag in Google Analytics 4

Google Analytics 4 is the current version, so we'll start here. The process is straightforward and happens within the "Admin" settings for your property's "Data Stream."

Step 1: Log in to Google Analytics

Navigate to https://analytics.google.com and sign in with the Google account associated with your property.

Step 2: Go to the Admin Section

In the bottom-left corner of the screen, you’ll see a gear icon labeled "Admin." Click on it to open the administrative settings.

Step 3: Select the Correct Account and Property

The Admin page has three columns: "Account," "Property," and "View" (for UA) or just "Account" and "Property" (for GA4). If you have access to multiple analytics properties, use the dropdown menus at the top of the columns to select the correct Account and the specific GA4 Property you need the tag for.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 4: Click on "Data Streams"

In the "Property" column (the middle one), look for an option called "Data Streams." In GA4, all data flows into your property through a data stream. For a website, you will have a "Web" data stream. Click on it.

Step 5: Select Your Web Data Stream

You will now see a list of the data streams you have set up. Most businesses will only have one listed here for their website. Click on your web data stream to open its details.

Step 6: Navigate to "View tag instructions"

Inside the Web stream details page, scroll down to the "Google tag" section. You'll find a box with an option called "View tag instructions." Click on that.

Step 7: Find Your Global Site Tag Under "Install manually"

A new screen will pop up with installation instructions. You'll see a couple of tabs — "Install with a website builder" and "Install manually." Click on "Install manually."

And there it is! This box contains the full Global Site Tag (gtag.js) script for your GA4 property. You can click the copy icon in the upper-right corner of the code box to grab it.

Your GA4 Global Site Tag will look something like this:

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

  gtag('config', 'G-XXXXXXXXXX'),
</script>

The 'G-XXXXXXXXXX' part is your unique Measurement ID. This is what tells the tag exactly where to send your website data.

Finding the Tag for Universal Analytics (UA)

While Universal Analytics properties stopped processing new data in July 2023, you might still need to find the old Universal Analytics tag for auditing, migration purposes, or simply to understand your legacy setup. The process is a bit different but just as easy.

Step 1: Go to the Admin Section

Just like with GA4, click the "Admin" gear icon in the bottom-left corner of your Google Analytics dashboard.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 2: Select Your Universal Analytics Property

Using the dropdowns, make sure you've selected an account and property that uses the Universal Analytics structure. You can tell it's a UA property because its Tracking ID starts with "UA-" (e.g., UA-12345678-1).

Step 3: Access Your "Tracking Info"

In the "Property" (middle) column, find and click on "Tracking Info." This section holds all the details related to your tracking code.

Step 4: Click on "Tracking Code"

An options menu will expand below "Tracking Info." The first one will be "Tracking Code." Click it.

Step 5: View and Copy Your UA Global Site Tag Snippet

On this page, you’ll see your Tracking ID (the UA-…… number) displayed prominently at the top. Below that is a section labeled "Global Site Tag (gtag.js)." This box contains the full code snippet you need.

Your Universal Analytics Global Site Tag will look like this:

<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-X"></script>
<script>
  window.dataLayer = window.dataLayer || [],
  function gtag(){dataLayer.push(arguments),}
  gtag('js', new Date()),

  gtag('config', 'UA-XXXXXXXXX-X'),
</script>

The key difference is the 'UA-XXXXXXXXX-X' part, which is your historic Tracking ID.

Common Problems: What If I Still Can't Find My Tag?

If you're looking for the code and not seeing it where you expect, one of a few common scenarios is likely at play. Let's troubleshoot.

Scenario 1: You're Using Google Tag Manager (GTM)

If your website is set up with Google Tag Manager, you will not install the Global Site Tag directly on your site. Instead, the only script on your site will be the GTM container snippet. All your tracking tags, including your Google Analytics 4 tag, are managed inside the Google Tag Manager interface.

How to Check: Right-click on your website, select "View Page Source," and use your browser's find function (Ctrl+F or Cmd+F) to search for gtm.js. If you find it, your website uses a Google Tag Manager setup.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Scenario 2: You're Using a Website Platform Integration or Plugin

Most modern website platforms (like Shopify, WordPress, Squarespace, and Wix) have built-in integrations or popular plugins (like MonsterInsights or Site Kit for WordPress) that handle Google Analytics for you.

In these cases, you don't need to copy and paste the entire Global Site Tag. Instead, the integration only asks for your Measurement ID (the G-XXXXXXXXXX part). You just need to find that ID (it’s visible right on the GA4 Data Stream Details page) and paste it into the designated field in your website platform's settings. The platform then generates and places the correct tracking code for you.

Scenario 3: You Don't Have the Right Permissions

To access the Admin section and view tracking code details, you need to have at least "Editor" level permissions for the Google Analytics property. If you can't see the "Admin" gear icon at all, or if the options are grayed out, you likely have "Viewer" permissions. You'll need to contact your account administrator to get upgraded access.

A Few Best Practices for Your Tracking Code

Once you have your Global Site Tag, keep these tips in mind for a successful installation:

  • Put It in the Right Place: The gtag.js script should be pasted immediately after the opening <head> tag on every single page of your website. Putting it in the header ensures it loads fast enough to capture data from every visitor before they navigate away.
  • Use One Tag: You only need to place the gtag.js code snippet on your site once. Having multiple instances of the same tracking code on a single page can cause inflated pageview counts and other data discrepancies.
  • Verify Your Installation: The best way to know if your tag is working is to go to your own website and then check the "Realtime" report in Google Analytics. If your visit shows up (it may take a minute or two), you’re good to go!

Final Thoughts

Finding your Google Analytics Global Site Tag is a quick task once you know where to look. Whether you're using GA4 or looking back at a Universal Analytics property, the tag lies within the Admin settings, ready to connect your website and unlock valuable visitor insights.

Of course, connecting your data sources is just the beginning. The next step is turning that data into clear, actionable answers. Instead of getting lost in default GA4 reports, we built a tool that lets you get insights instantly. With Graphed, you can connect your Google Analytics account in seconds and use simple, natural language to create dashboards and ask questions like, "Which marketing channels are driving the most conversions?" or "Show me a chart of our top landing pages by traffic this month." We handle all the heavy lifting in the background, so you can focus on making smarter decisions, faster.

Related Articles