How to Find Google Analytics 4 Tracking ID

Cody Schneider7 min read

If you're looking for your Google Analytics tracking ID, you’ve probably noticed things have changed. The old, familiar "UA-XXXXXXXX-X" code is gone, replaced by a new format in Google Analytics 4. This article will show you exactly where to find the new GA4 tracking code, now called a "Measurement ID," and explain how to use it to start collecting data from your website.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

GA4 Measurement ID vs. UA Tracking ID: What’s the Difference?

For years, marketers and site owners were used to the Universal Analytics (UA) Tracking ID. It was a simple, reliable code that started with "UA" and was the key to connecting your website to Google Analytics. However, with the full rollout of GA4, Google introduced a new system and a new ID.

The Old: Universal Analytics (UA) Tracking ID

The UA Tracking ID was the unique identifier for a Universal Analytics property. It followed this format:

UA-12345678-1

  • UA: Stood for Universal Analytics.
  • 12345678: Your unique account number.
  • 1: The property index number within your account.

This ID was used to track user interactions on a website, focusing primarily on sessions and pageviews. It was built for a web-centric world and worked well for that purpose.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

The New: GA4 Measurement ID (or Tag ID)

In Google Analytics 4, the "Tracking ID" has been renamed to a "Measurement ID." It looks completely different and serves a slightly different purpose. The new format is:

G-XXXXXXXXXX

The main reason for this change is that GA4 has a fundamentally different data model. It’s built to be more flexible and track data across platforms, not just websites. While UA was session-based, GA4 is event-based. This means it can measure a cohesive user journey across your website and your mobile app.

Because of this, the Measurement ID is tied to a specific data stream within your GA4 property. You can have multiple data streams for one property - one for your website, one for your iOS app, and one for your Android app - all feeding data into the same place. The "G-" ID is typically for your web data stream.

How to Find Your GA4 Measurement ID: A Step-by-Step Guide

Finding your G-ID is straightforward once you know where to look. Just follow these steps.

Step 1: Log in to your Google Analytics account.

Step 2: In the bottom-left corner, click on the gear icon to go to the Admin section.

Step 3: You will see two columns: Account and Property. Make sure you have the correct account and GA4 property selected. If you need to switch, use the dropdown menus at the top of each column.

Step 4: In the Property column, click on Data Streams. This is where GA4 manages the individual sources of data coming into your property.

Step 5: You’ll see a list of your data streams. For most users, there will only be one stream for your website. Click on the web data stream for which you need the ID.

Step 6: The stream details will open. Your Measurement ID (starting with "G-") is displayed in the top-right corner of the page. You can click the copy icon next to it to easily save it to your clipboard.

And that’s it! You've successfully located your GA4 Measurement ID. Now you’re ready to implement it.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

What If I Only Have a Universal Analytics Property?

Since Google officially sunsetted Universal Analytics in July 2023, you can no longer process new data in your UA properties. If you're still working with an old UA account, you won't have a "G-" Measurement ID. You'll need to create a new GA4 property first.

Fortunately, Google makes this easy with the GA4 Setup Assistant.

  1. Navigate to the Admin section of your old Universal Analytics property.
  2. In the Property column, the first option should be GA4 Setup Assistant. Click it.
  3. Follow the on-screen wizard under "I want to create a new Google Analytics 4 property." It will guide you through creating a parallel GA4 property based on your existing UA settings.

Once the new GA4 property is created, you can switch to it using the property selector in the Admin panel and then follow the step-by-step guide in the section above to find your new Measurement ID.

How to Use Your GA4 Measurement ID

Just finding your GA4 ID isn't enough, you need to add it to your website to start collecting data. There are a few common ways to do this.

Method 1: Directly on Your Website with Google Tag (gtag.js)

This is the classic method of adding a piece of JavaScript code to your website's files. It’s best for people who are comfortable editing their site's HTML.

  1. In GA4, go to Admin > Data Streams and click on your web stream.
  2. Under the main details, look for the "Google tag" section and click "View tag instructions."
  3. A pane will slide out with installation instructions. You'll see a code snippet that starts with <-- Google tag (gtag.js) -->.
  4. Copy this entire code snippet.
  5. Paste it into the <head> section of every page of your website. If you're using a CMS like WordPress, you can often add this to a header/footer plugin or your theme's header.php file.

Your Measurement ID is already included in this code, so you don’t need to do any extra configuration.

<!-- 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>
GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Method 2: Using Google Tag Manager (GTM)

Google Tag Manager is the recommended method for anyone who plans to manage multiple tracking tags (like for Google Ads, Facebook Pixel, etc.). It acts as a container for all your scripts, making site management much cleaner.

  1. Copy your GA4 Measurement ID (G-XXXXXXXXXX) from the data stream details page.
  2. Go to your Google Tag Manager container.
  3. Click Tags > New.
  4. Give your tag a clear name, like "GA4 - Configuration Tag".
  5. Click inside the "Tag Configuration" box and choose the Google Tag tag type.
  6. In the 'Tag ID' field, paste your GA4 Measurement ID.
  7. Click inside the "Triggering" box and select the Initialization - All Pages trigger. This ensures the tag fires as early as possible on every page.
  8. Click Save.
  9. Finally, click Submit and then Publish in the top-right corner to make your changes live.

Method 3: Plugin or Platform Integration (like Shopify or WordPress)

Many website builders and e-commerce platforms have built-in integrations for Google Analytics, making installation incredibly simple.

  • For WordPress: Many SEO plugins or dedicated Google Analytics plugins (like Google's Site Kit) provide a simple field where you can paste your "G-" Measurement ID. Find this field in the plugin’s settings, paste your ID, and save the changes.
  • For Shopify: Shopify has a native integration. Go to Online Store > Preferences in your Shopify admin. Find the "Google Analytics" section and paste your Measurement ID into the field. Shopify will handle the rest.
  • For Squarespace or Wix: These platforms also have designated marketing or analytics integration settings. Find the section for Google Analytics, where you can easily add your Measurement ID.

Final Thoughts

Finding your Google Analytics ID might seem confusing at first with the shift from UA to GA4, but it’s a simple process once you know where to look. By navigating to Admin > Data Streams, you can quickly locate your "G-" Measurement ID and use it to connect your website for comprehensive, event-based tracking.

Once you’ve set up your analytics and are collecting data from GA4, the next step is combining it with information from your other marketing and sales tools. This is where we built Graphed. Instead of logging into a dozen different platforms, we let you connect data sources like Google Analytics, Shopify, and Facebook Ads with a single click. Then, you can ask questions in plain English - like "show me which campaigns drive the most revenue" - and instantly get live dashboards, eliminating hours of manual report building each week.

Related Articles