New: SEO Blog Writer, a readable, checked blog post for your site every week. Pay once, download straight away.

See it
AI Skill Up
Browse skills

Where to find your GA4 measurement ID, and what it is not

The G- measurement ID identifies a GA4 web stream. Where to find it, how it differs from the property ID and the Measurement Protocol secret, and who sees it.

GA4 has several identifiers that look similar, and pasting the wrong one into your site is a common reason a tag sends nothing. The one the tag needs is the measurement ID, and it always starts with G-.

Finding it

  1. Open Google Analytics and choose the property.
  2. Admin, then Data collection and modification, then Data streams.
  3. Choose the web stream for your site.
  4. Copy the Measurement ID from the stream details.

The identifiers, side by side

IdentifierLooks likeUsed forPrivate?
Measurement IDG-ABC123XYZThe tag on your siteNo, it is public
Property IDA number, like 412345678Admin, APIs, supportNo, but not needed in the tag
Stream IDA longer numberThe Admin APINo
Measurement Protocol API secretA random stringServer-side eventsYes, keep it secret

Old IDs

An ID starting UA- belonged to Universal Analytics, which Google shut down. If your site still has one, it is sending nothing useful. Replace it with a G- ID from a GA4 property.

One property, several streams

A property can hold a web stream and app streams. Each web stream has its own measurement ID. If you see two G- IDs for one site, check whether someone created a second stream, or a second property, by accident; data split across them is hard to combine later.

Keep it in one place

Put the ID in one config value or environment variable and read it wherever the tag loads. A site with the ID typed into three templates eventually has two different IDs. On this site it lives in one tracking config file. For framework specifics, see adding GA4 to Next.js.

GA4 + Search Console Setup creates the web stream, reads the measurement ID itself and writes it into your code, so there is no copying between the Google console and your editor.

Questions

Where do I find the GA4 measurement ID?

In Admin, open Data streams, choose your web stream, and the measurement ID starting with G- is shown in the stream details.

Is the measurement ID secret?

No. It is in the source of every page that loads the tag. Anyone can read it. The Measurement Protocol API secret is different and should be kept private.

What is the difference between the property ID and the measurement ID?

The property ID is a number that identifies the whole property, used in the Admin and APIs. The measurement ID starts with G- and identifies one web data stream; it goes in the tag.

Or skip the afternoonand drop one in.