Sub topic 1
How GA4 is organized: accounts, properties, and data streams
Google Analytics 4 (GA4) stores your data in a three-level hierarchy. Almost every later task in this tutorial, such as creating a property, installing a tag, or granting access, depends on knowing which level you are working at. This chapter builds that mental model and covers the mistakes people commonly make when they get it wrong.
Prerequisites
This chapter assumes you have the following:
- A Google account you can sign in with.
- Basic familiarity with websites and HTML, including what a page template and a
<head>element are. - A general idea of what web analytics measures, such as visits, page views, and conversions.
You do not need an existing Google Analytics account. You also do not need to install anything yet. This chapter is about structure, and later chapters cover creation and installation step by step.
The three levels
GA4 organizes everything into three nested levels.
- Account. The top-level container. It usually represents an organization, a company, or a client. An account holds one or more properties.
- Property. The unit where data is stored, processed, and reported. A property holds your events, reports, audiences, and most configuration. A property holds one or more data streams.
- Data stream. A source of data flowing into a property. A web data stream collects from a website. An iOS app stream and an Android app stream collect from mobile apps.
Data flows upward through this structure. A browser sends an event to a data stream. The stream delivers it to its property, and you read it in that property's reports. The account only groups properties together and holds settings that apply to all of them.
What each level controls
The level at which you set something decides how far it reaches. The table summarizes the most common settings.
| Level | What lives here | Typical examples |
|---|---|---|
| Account | Grouping, access, and account-wide settings | Account name, user access that applies to every property, data sharing settings, change history |
| Property | Data collection scope, processing, and reporting | Time zone, currency, event data retention, reports, audiences, conversions, links to other products |
| Data stream | One source of data | Measurement ID, enhanced measurement toggles, the website URL, stream-level tag settings |
Two details are worth remembering.
- Access can be granted at the account or the property level. A role granted on the account is inherited by every property inside it. A role granted on one property applies only to that property. Chapter content on roles comes later, but the inheritance rule follows directly from the hierarchy.
- Reports belong to the property, not the stream. If a property has a web stream and an app stream, reports can show both together. You can then break the data apart by stream or platform when you need to.
What a property is, and why it matters most
The property is the level where most decisions have lasting effects. Several of its settings are hard or impossible to change in a way that rewrites history:
- Time zone. Reports use the property's time zone to decide where one day ends and the next begins. Changing it later does not reprocess old data, so you can get odd daily totals around the date of the change.
- Currency. Revenue is reported in the property's currency. Changing it later does not convert past values.
- Data. Data is never copied from one property to another. If you create a second property, it starts empty.
Because history does not move, it is cheaper to plan the property structure first than to reorganize later. The final chapters of this tutorial return to this planning question in detail.
What a data stream is
A data stream is a configured connection between one source and one property. For a website, the stream records the site's URL and a name, and it generates a measurement ID. The measurement ID is an identifier that looks like G-XXXXXXXXXX. Your site's tag uses the ID to say which stream the data belongs to.
The stream also holds the enhanced measurement switches. Enhanced measurement is a set of events that GA4 can collect automatically, such as scrolls and outbound clicks, without extra code. Those switches belong to the stream, so two web streams in one property can be configured differently.
The tag on your page is the link between your site and the stream. Here is the standard tag, as it appears for a web stream:
<!-- 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>The measurement ID appears twice. The first appearance, in the script URL, loads the Google tag library. The second, in the config call, tells the tag which stream to send data to. If you replace the ID with one from a different stream, the data goes to that other stream and its property. Nothing in the hierarchy tells the tag which account or property to use. The measurement ID alone determines this.
How data flows through the hierarchy
The following sequence shows what happens when a visitor loads a page that carries the tag.
Reports in the property do not show a new event instantly in the standard views. The Realtime report is the exception, and a later chapter covers it along with DebugView for testing.
Common ways to organize things
You can start with one account, one property, and one web stream for a single website. That setup is correct for many small sites. As needs grow, these patterns are common:
- One property for a site and its apps. If you want a combined view of a product across web, iOS, and Android, put the three streams in a single property.
- Separate properties for unrelated sites. Sites that have different audiences, goals, or owners usually work better in separate properties, so their reports do not mix.
- Separate properties for testing. A test or staging environment often gets its own property so test traffic does not pollute production reports.
- Separate accounts for separate owners. If different clients or business units should not share access by default, give each its own account.
Each choice trades convenience against clarity. Combining streams in one property gives unified reports. Separating them gives clean boundaries and simpler access control. There is no single right answer, which is why it pays to decide before you collect data.
Common mistakes
- Treating the account as the place data is stored. Reports and data live in the property. Opening an account with no property gives you nothing to report on.
- Putting unrelated sites in one web stream. A stream is meant to represent one source. Mixing unrelated sites makes reports hard to separate and settings hard to manage.
- Copying a measurement ID from the wrong stream. The data lands in whichever property owns that stream. The mistake is silent, because the tag still works.
- Assuming a settings change rewrites history. Time zone, currency, and similar changes affect new data only.
- Confusing GA4 properties with older Universal Analytics properties. Older properties used IDs beginning with
UA-and a different data model. GA4 uses measurement IDs beginning withG-. AUA-ID does not work with the GA4 tag.
Worked example: planning a small business
Suppose a company runs a marketing site at www.example.com, a store at shop.example.com, and a staging copy of the store used for testing. A reasonable plan could be:
- One account named for the company.
- A property for the live sites, with one web stream per hostname, or one stream per site if the two are measured together.
- A separate property for staging, with its own web stream, so test purchases never appear in revenue reports.
The two live hostnames share a customer journey, which is why they sit in the same property. If they needed to be joined into one session across domains, you would also set up cross-domain measurement, covered in a later chapter. Staging is separate because its traffic has a different purpose.
Exercise
A company wants a combined view of its website and Android app, but wants its internal test site kept out of those reports. Describe a structure using accounts, properties, and streams, and say which level holds the measurement ID.
Show answer
Use one account for the company. Create one property for production, containing a web data stream for the website and an Android app data stream, so reports can combine them. Create a second property for the test site, with its own web data stream, so test traffic never enters production reports. The measurement ID belongs to the data stream, so each web stream has its own ID, and the tag on each site must use the ID of the stream in the correct property.
Exercise
A developer changes the property's currency from USD to EUR six months after launch. What happens to revenue values already recorded, and why does this matter for planning?
Show answer
Past revenue values stay as they were recorded and are not converted. Only new data uses the new currency. This is why time zone and currency should be chosen correctly when the property is created, because they are set at the property level and do not rewrite history.