Analytics and Tracking

Measurement ID

The G- code that tells Google Analytics 4 which web data stream a visit belongs to.

Quick facts: Measurement ID

Category
Analytics and Tracking
Level
Beginner
Affects
GA4 data collection, conversion imports into Google Ads, report accuracy
Where to see it
GA4 Admin data stream details, Google Tag Manager, Tag Assistant, page source, GA4 Realtime report
In this article4
  1. How a measurement ID works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

A measurement ID is the code, starting with G- and followed by letters and numbers, that tells Google Analytics 4 which web data stream a visit belongs to. Every page view, click or enquiry your site sends to GA4 carries this ID, and that is how the data ends up in your property rather than someone else’s.

How a measurement ID works

In Google Analytics 4, an account holds one or more properties, and each property holds data streams: usually one for a website and one each for any iOS or Android app. Each web stream gets its own measurement ID. You find it in GA4 under Admin, then Data streams, then the stream itself, in the top right of the stream details.

The ID is placed on your site in one of three usual ways:

  • In the Google tag snippet (gtag.js) pasted into the head of every page.
  • In a Google tag inside Google Tag Manager, where it goes in the tag ID field.
  • In a plugin or platform setting, such as a WordPress analytics plugin or the Google channel in Shopify.

When a visitor’s browser loads the tag, every event it sends includes the measurement ID. Google’s servers read it and file the event under the matching stream. The ID is not a password. Anyone can see it in your page source, and that is by design.

You may also see a “tag ID”. A Google tag can send data to several destinations, such as a GA4 stream and a Google Ads account, and the tag ID identifies the tag itself. For a simple GA4 set-up the tag ID and the measurement ID are often the same G- code, which is why the two terms get mixed up.

Why it matters

If the measurement ID is wrong, missing or duplicated, everything downstream is wrong: traffic, key events, the conversions you import into Google Ads and the reports you use to decide where the marketing budget goes. A UK business that spends a few hundred pounds a month on ads can easily make that decision on numbers that are half or double reality, purely because of an ID problem.

It also matters for consent. Under PECR, analytics cookies have generally needed the visitor’s agreement first (the Data (Use and Access) Act 2025 adds a narrow exemption for some analytics, with conditions, and nothing for advertising), so the tag carrying your measurement ID should be controlled by your cookie banner through consent mode. When I audit tracking, finding every place the ID appears is one of the first checks, because a second copy hard-coded in a theme often fires before the banner has had a chance to ask.

Common mistakes

  • Two copies of the same ID. A plugin and a hand-pasted snippet both load the tag, so every page view is counted twice and engagement rate looks oddly high.
  • The old Universal Analytics ID still in place. Standard Universal Analytics properties stopped processing data in July 2023, so a site still sending only UA- hits is recording nothing.
  • A staging or test site using the live ID. Developer visits and test form submissions pollute your real reports.
  • The ID copied from the wrong property. Agencies and freelancers sometimes leave a site reporting into their own account, so the owner cannot see the data.
  • Using the ID instead of the API secret. Server-side sending through the Measurement Protocol needs a separate secret; the measurement ID alone is not enough.

How to act on it

  1. Open GA4 and note the measurement ID of your web stream.
  2. View the source of your homepage and search for “G-”. Every G- code you find should be one you recognise.
  3. Use Tag Assistant to confirm the tag fires once per page, and only after consent where your banner requires it.
  4. Check the Realtime report while you browse the site in another window, and confirm your own visit appears.
  5. Remove any duplicate or stray IDs, and make sure the property belongs to your business’s own Google account.

If several tools, plugins and past suppliers have touched your tracking, a structured review as part of performance marketing work is usually quicker than hunting for each copy yourself.

Do and do not

Do

  • Check your page source for every G- code the site sends
  • Confirm the tag fires once per page and respects your cookie banner
  • Keep the GA4 property in your own business account

Do not

  • Load the same ID through a plugin and a pasted snippet
  • Let staging or test sites send data to the live ID
  • Confuse the measurement ID with the Measurement Protocol API secret

Questions people ask about this

Is it safe to share my GA4 measurement ID?

Yes. The measurement ID is visible in your page source to anyone who looks, so it is not a secret. It lets data be sent to your property, but it does not give access to your reports. What you should never share publicly is a Measurement Protocol API secret or a login to the GA4 account itself.

Is the measurement ID the same as the property ID?

No. The property ID is a number only, used inside GA4 and in tools such as Looker Studio and the reporting API to identify the whole property. The measurement ID starts with G- and identifies one web data stream within that property. You need the measurement ID for the tag on your site and the property ID for most reporting connections.

Can I use one measurement ID on two websites?

You can, and both sites will report into the same stream. That is sometimes deliberate, for example a main site and a booking subdomain that you want to see as one journey, but you then need cross-domain settings so visitors are not split into two users. For two unrelated businesses, use separate properties so the data stays clean.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.