Sub topic 1
Properties and data streams: where data lands
Every GA4 number starts with a decision about where the data goes. A hit sent to the wrong place will not show up in the report you expect. This chapter covers the containers that receive data: accounts, properties, and data streams. The later chapters on events, users, and sessions assume you know this layout.
Prerequisites
This chapter assumes you:
- know how a website or app loads pages or screens, and what an analytics tool does.
- can read short JavaScript snippets such as
gtag('config', ...). - can read a basic
curlcommand. - have access to a GA4 property, or can read along without one.
The hierarchy: account, property, data stream
GA4 organizes data in three levels.
- Account: the top-level container. It holds users and access permissions, and usually represents one company or business unit.
- Property: the unit of reporting. A property is a single, separate store of events. Reports, audiences, key events, custom definitions, retention settings, and the BigQuery link all belong to the property.
- Data stream: a source of data that feeds a property. A stream is one website, one iOS app, or one Android app.
Events from all streams in a property are stored together. A web page_view and an app screen_view land in the same pool, and each event is tagged with the stream it came from.
Data streams in detail
A stream has an identifier that tells GA4 where an incoming event belongs. Which identifier you use depends on the stream type.
| Stream type | Identifier | How data is collected |
|---|---|---|
| Web | Measurement ID, such as `G-XXXXXXXXXX` | The Google tag (gtag.js) or Google Tag Manager running in the browser |
| iOS app | Firebase app ID | The Firebase SDK inside the app |
| Android app | Firebase app ID | The Firebase SDK inside the app |
| Server-side (supplement) | Measurement ID or app ID plus an API secret | The Measurement Protocol, an HTTP API |
Web streams
A web stream is tied to a site, and its Measurement ID starts with G-. The tag loads, reads the ID, and sends every event to that stream. A minimal setup looks like this:
<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>The config call sets up the stream. By default it also sends the first page_view. Other settings you apply later, such as user_id, are passed to the same call.
A web stream also holds settings that apply only to that stream:
- Enhanced measurement toggles, such as scrolls, outbound clicks, and file downloads. You turn each on or off per stream.
- Cross-domain configuration, a list of domains that share one client ID so a visit stays one session across them.
- Tag settings, including the list of unwanted referrals and internal traffic rules.
App streams
An app stream is created for a specific app on a specific platform. The app registers with Firebase, and the Firebase SDK sends events using the app ID. Android and iOS are separate streams even if they are the same product. You get each platform's data, and you can still analyze them together because they share a property.
Measurement Protocol
The Measurement Protocol lets a server send events directly to a stream. It does not replace the browser or app tag. It supplements them, for example to record a refund processed in a back-office system or an offline purchase. It requires an API secret that you create in the stream settings, and a client_id so GA4 can tie the event to a user.
curl -X POST \
"https://www.google-analytics.com/mp/collect?measurement_id=G-XXXXXXXXXX&api_secret=YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"client_id": "1234567890.1700000000",
"events": [
{
"name": "refund",
"params": {
"currency": "USD",
"transaction_id": "T_12345",
"value": 29.99
}
}
]
}'The /mp/collect endpoint returns a success status even when the payload is wrong, so a 2xx response does not mean the event is valid. To check a payload, send it to /mp/debug/collect, which returns validation messages.
What belongs to the property and what to the stream
Mixing up the two levels is a common source of confusion. Use this table to decide where to look.
| Setting or feature | Level |
|---|---|
| Reporting time zone and currency | Property |
| Event data retention | Property |
| Key events | Property |
| Custom dimensions and metrics | Property |
| Audiences | Property |
| BigQuery link | Property |
| Data filters (internal and developer traffic) | Property |
| Measurement ID or app ID | Stream |
| Enhanced measurement toggles | Stream |
| Cross-domain settings | Stream |
| Measurement Protocol API secrets | Stream |
Some consequences follow from this split:
- A custom dimension that you register once works for events from every stream in the property.
- A key event marked in the property applies to every stream that sends an event with that name.
- Changing an enhanced measurement toggle on the web stream does not change the apps.
Settings that are not retroactive
Property-level settings generally apply to data from the moment you change them. Examples:
- Changing the reporting time zone changes how new data is bucketed by day. It does not rewrite old data, and it can create a visible step in daily charts.
- Changing the currency does not convert past revenue.
- Registering a custom dimension does not fill in past events. It only works for data collected after registration.
- Lowering the data retention period affects how far back Explorations can look, but standard aggregated reports are not limited by it.
GA4 also does not backfill data. If a stream was not sending events yesterday, no setting can recover yesterday.
Choosing how many properties and streams
The usual starting point is one property per product, with one stream per website or app platform in that product. For example, a retailer with a website, an iOS app, and an Android app would create one property with three streams.
Putting streams in one property has real benefits:
- You can follow one person across platforms, provided you send a
user_id. - Reports can compare platforms side by side, using the stream or platform dimension.
- You configure key events and custom definitions once.
Separate properties make sense when:
- The sites are unrelated businesses with different audiences and goals.
- Teams need strict access separation and independent settings.
- Two sites need different time zones or currencies.
The cost of splitting is that GA4 standard properties cannot merge data across properties in reports. A visit that starts on one property and continues on another appears as two unrelated users. Roll-up and subproperty features exist in the paid Analytics 360 tier, but they are outside this tutorial. Also check Google's current documentation for quotas, since limits on properties per account and streams per property can change.
A typical pattern for staging and production is a separate test property, or a data filter set to a test state. That keeps debugging events out of production numbers.
Checking that data lands where you expect
When a number looks wrong, confirm the destination before looking at anything else.
- Open the stream details and copy the Measurement ID. Compare it to the ID in your page source or tag manager container.
- Use the Realtime report to see events arriving within a few seconds.
- Use DebugView to inspect individual events as they arrive from a device in debug mode.
- In reports, add the stream name or hostname as a dimension. This shows whether traffic comes from the stream you expect.
- For server events, send a test payload to
/mp/debug/collectand read the validation messages.
Standard reports can take several hours to process. Realtime and DebugView are the right tools for immediate checks.
Common mistakes
- Two tags on one page. If a page loads both a hard-coded gtag snippet and a Tag Manager tag for the same stream, events are sent twice. Page views and sessions inflate.
- One Measurement ID used on many unrelated sites. Everything merges into one stream, and you cannot separate it later except by filtering on hostname.
- Mixing test and production data. Without a separate property or a filter, test events change real totals.
- Expecting a stream setting to apply everywhere. Enhanced measurement is per stream. A scroll event may exist for the website but not for the app.
- Leaking the API secret. The Measurement Protocol secret is meant for servers. Put it in an environment variable or secret store, never in client-side code.
- Assuming a changed setting fixes old data. Time zone, currency, and custom definitions only affect new data.
Exercise
A retailer has a website, an iOS app, and an Android app, and wants to see how many people use more than one of them. Should they create one property or three, and what must they send for cross-platform linking to work?
Show answer
One property with three data streams. Events from all streams then land in the same store, and the platforms can be compared and combined. To recognize the same person on different devices, the site and apps must send the same user_id for signed-in users.
Exercise
You change the reporting time zone of a property today. Will last month's daily totals change? And you register a custom dimension today. Will it show values for last month's events?
Show answer
No to both. Property settings apply to data collected from the moment of change. Past data keeps the time zone it was processed with, and a custom dimension only reports values for events collected after it was registered.
Exercise
A developer's page loads a hard-coded gtag snippet and also a Google Tag Manager container that sends a GA4 configuration tag with the same Measurement ID. What symptom do you expect, and how would you confirm it?
Show answer
Duplicate events, so page views and sessions are inflated. Confirm it by opening DebugView or the browser's network panel and looking for two page_view requests for each page load. Then remove one of the two tags.