Where is the Google Analytics Tracker?

Cody Schneider••7 min read

Finding your Google Analytics tracker can feel like a scavenger hunt, but it's much simpler once you know where to look. This tracker is the critical key that allows Google to collect data from your website and show you how visitors are interacting with your content. This guide will walk you through exactly where to find your GA4 Measurement ID and the full tracking code, and how to get it set up on your site.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

What Exactly Is the Google Analytics Tracker?

Before we go hunting, let's clarify what we're looking for. The "Google Analytics tracker" usually refers to one of two things, and both work together:

  • The Measurement ID (e.g., G-XXXXXXXXXX): This is your unique identifier for a specific website or app in Google Analytics 4. Think of it like a mailing address. When data is sent to Google, this ID tells Google which property it belongs to. You'll use this ID most often when setting up GA4 through a CMS plugin or Google Tag Manager.
  • The Tracking Code (Global Site Tag or gtag.js): This is the full JavaScript snippet that you place in the HTML of your website. The code contains your Measurement ID and has all the instructions for how to collect data and where to send it. You need this if you're installing Google Analytics manually on a custom-coded website.

A Quick Note: Universal Analytics (UA) vs. Google Analytics 4

You may see older tutorials mention a "Tracking ID" that starts with "UA-" (e.g., UA-12345678-1). This belongs to Universal Analytics, the previous version of Google Analytics, which was officially discontinued in July 2023. This article focuses exclusively on Google Analytics 4 and its "Measurement ID" (starting with "G-"). All new setups should be done using GA4.

Where to Find Your GA4 Measurement ID

Let's find the simple ID first. This is what you'll need if you're using a platform like WordPress or Shopify that has a dedicated field for your Google Analytics ID.

Follow these steps:

  1. Log in to Google Analytics: Go to the Google Analytics homepage and sign into your account.
  2. Navigate to the Admin Section: In the bottom-left corner of the screen, click on the gear icon labeled 'Admin'.
  3. Check Your Account and Property: On the Admin page, you'll see two main columns: 'Account' and 'Property'.
  4. Open 'Data Streams': In the 'Property' column (the one on the right), click on 'Data Streams'. This is where your data sources, like your website, are configured.
  5. Select Your Website Stream: You'll see a list of your data streams. For your website, you'll likely only have one. Click on it to open its details.
  6. Find Your Measurement ID: You've made it! The Measurement ID will be prominently displayed in the top-right corner. It will be the value formatted as 'G-XXXXXXXXXX'. You can click the icon next to it to easily copy it to your clipboard.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

How to Locate the Full GA4 Tracking Code (gtag.js)

If you're building a website from scratch or need to install the code manually for any other reason, you'll need the complete JavaScript snippet. This process starts from the same place where you found your Measurement ID.

  1. Go Back to Your Data Stream Details: Follow steps 1-5 from the previous section to get to your web stream details page.
  2. View Tag Instructions: Scroll down the page and look for the 'Google tag' section. Click on 'View tag instructions'.
  3. Install Manually: A new tab will open with installation instructions. You might see several options, like installing with a website builder. Click the tab that says 'Install manually'.
  4. Copy the Code: You will now see the full Global Site Tag (gtag.js) script. This is your complete tracking code.

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

Use the copy icon in the upper-right corner of the code box to grab the entire snippet.

How to Add the GA4 Tracker to Your Website

Now that you have your ID and code, you have a few ways to install it. The best method depends on how your website is built.

1. Manual Installation (For custom-coded sites)

If you built your website with plain HTML, CSS, and JavaScript, this is the way to go. Take the full gtag.js code snippet you just copied and paste it into the <head> section of every single page on your website. Placing it in the head ensures it loads early, maximizing the chances of capturing every pageview.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

2. Using a CMS plugin or Theme Setting

This is the easiest method and is perfect for users of platforms like WordPress, Shopify, Wix, or Squarespace.

  • For WordPress: You can use the official 'Site Kit by Google' plugin, which handles the connection for you. Alternatively, many themes and other analytics plugins (like MonsterInsights) have a dedicated settings field where you just paste your Measurement ID (G-XXXXXXXXXX), and they handle injecting the code for you.
  • For Shopify: In your Shopify admin, go to Online Store > Preferences. You'll find a 'Google Analytics' section. All you have to do is paste your Measurement ID here, and Shopify does the rest.

3. Using Google Tag Manager (Recommended for flexibility)

Google Tag Manager (GTM) is a free tool that acts as a container for all your marketing and analytics tags. Instead of adding a dozen different scripts to your site's code, you add the GTM script once, then manage all your other tags (including GA4) through the GTM interface. It's the most flexible and scalable method.

The setup is slightly more involved but follows this general process:

  1. In GTM, create a new tag and select the 'Google Analytics: GA4 Configuration' tag type.
  2. In the 'Measurement ID' field, paste your G-XXXXXXXXXX ID.
  3. Set the tag to trigger on 'All Pages'.
  4. Publish your GTM container.

The main advantage is a much cleaner codebase and the ability to add more tracking (like button clicks or form submissions) later without ever needing to touch your website's code again.

How to Check if Your Tracker is Working

Once you've installed your tracker, don't just assume it's working. Here are two quick ways to verify that data is being collected.

Method 1: The Realtime Report

This is the simplest way to get instant confirmation.

  1. In your Google Analytics account, go to Reports > Realtime.
  2. In a new browser tab, open your own website. Click around to a few pages.
  3. Switch back to the Realtime report. Within a minute, you should see at least one user appear on the map and in the data cards. If you see your activity, you know it's working!

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Method 2: Use the Google Tag Assistant

For a more technical check, you can use Google's Tag Assistant Chrome extension. After adding it to your browser, go to tagassistant.google.com, enter your website URL, and start the debug mode. It will open your website in a new window and show you exactly which Google tags are firing on each page, including your GA4 tag.

Final Thoughts

Finding your Google Analytics tracker comes down to navigating to the "Data Streams" section within the GA4 Admin panel. From there, you can grab either your simple Measurement ID for plugins or the full gtag.js code snippet for manual installation. Verifying your setup with the Realtime report is a quick final step that gives you the confidence that everything is connected correctly.

Once your data is flowing, the next challenge is turning all of those numbers into clear, simple answers about what's working for your business. Rather than spending hours digging through GA4 reports, we thought there should be an easier way to get insights. That's why we built Graphed. After you connect your Google Analytics account, you can simply ask questions in plain English - like "Which of my blog posts got the most traffic this quarter?" - and instantly get dashboards and charts without the steep learning curve.

Related Articles