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
- Open GA4 and note the measurement ID of your web stream.
- View the source of your homepage and search for “G-”. Every G- code you find should be one you recognise.
- Use Tag Assistant to confirm the tag fires once per page, and only after consent where your banner requires it.
- Check the Realtime report while you browse the site in another window, and confirm your own visit appears.
- 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.
