GA4 data streams: web, iOS and Android
Every Google Analytics 4 property gets its data through data streams: one for a website, one for each app platform. This guide covers what a stream is, how many a property can have, how to add one, where the measurement ID comes from, which settings live on the stream, and how many streams you actually need, using what Google documents.
This guide is built from Analytics Help: Google Analytics hierarchy, Data stream, Set up Analytics for a website and/or app, Measurement ID, Google Analytics account structure and Data redaction, plus the Help articles on configuring Google tag settings and renaming and generating events. Quotes are Google's wording; the last section is our own practice.
What a data stream is
GA4 is organised as account, property and data stream. Google defines a stream as "a flow of data from a customer touchpoint (e.g., app, website) to Analytics", and its glossary lists the kinds: "There are 3 types of data stream: Web (for websites), iOS (for iOS apps), and Android (for Android apps)." Our GA4 basics guide walks through the account and property levels; this page is only about the stream.
When you create a stream, "Analytics generates a snippet of code that you add to your app or site to collect that data. Data is collected from the time you add the code". There is no backfill: a stream starts empty and only counts from the day its tag or SDK goes live.
If you also use Firebase, the levels map like this: an Analytics property matches a Firebase project, and an app data stream matches a Firebase app.
Limits per property
Google's limit: "Each Google Analytics property can have up to 50 data streams (any combination of app and web data streams, including a limit of 30 app data streams)." Few businesses get near it. The more useful number is Google's own recommendation in the account structure guide: "The best practice is to use a maximum of 3 data streams per property: 1 single web data stream to measure the web user journey and 1 app data stream each for iOS and Android."
For apps, "You can have one data stream for each combination of app-package name and platform", and "Each app data stream can only be linked to one GA4 property". If you need the same data in more than one place, Analytics 360 has subproperties and roll-up properties for that; extra streams aren't the tool.
Adding a data stream
You need the Editor role or above on the property. Then:
- In Admin, under Data collection and modification, click Data streams.
- Click Add stream and choose iOS app, Android app or Web.
- Web: enter the URL of your primary website and a stream name. You can switch enhanced measurement on or off here; Google recommends turning it on, since you can disable single events later (see our enhanced measurement guide). Click Create stream.
- iOS or Android: enter the iOS bundle ID or Android package name, the app name and, for iOS, the App Store ID, then click Register app. Download the config file, add the Google Analytics for Firebase SDK, then run the app to check it reaches Google.
For app streams, Google notes that "Analytics creates a corresponding Firebase project and app data stream, and automatically links the Firebase project to your property" if they aren't already linked. To use an existing Firebase project instead, you link it from the Firebase side. Our mobile app analytics guide covers what to measure in the app once the stream exists.
For a web stream, the next step is installing the Google tag: through a CMS field, by pasting the tag after <head>, or through Google Tag Manager. Google says "Data collection may take up to 30 minutes to begin"; DebugView and Realtime show whether hits arrive.
The measurement ID
Google describes the measurement ID as "a unique identifier for a web data stream". It is "'G-' followed by a combination of numbers and letters", and "the measurement ID is the same ID as the destination ID" that the Google tag uses. To find it: Admin > Data streams, the Web tab, click the stream, and it is "in the first row of the stream details."
Two things often get mixed up. The stream ID shown on the same screen is a different number, and the Measurement Protocol needs the measurement ID, not the stream ID. App streams have no G- ID; they are identified through Firebase, which is why the Measurement Protocol uses a Firebase app ID for them.
Settings that live on a web stream
Several GA4 settings aren't property-wide but belong to one web stream, so a property with two web streams needs them set twice. Open a stream from Admin > Data streams to reach them:
- Enhanced measurement: automatic page view, scroll, outbound click, site search, form, video and file download events. Details in our enhanced measurement guide.
- Google tag settings: Google's list includes configuring your domains for cross-domain measurement, defining internal traffic, listing unwanted referrals, adjusting the session timeout ("The default timeout is 30 minutes") and the engaged-session timer ("The default threshold for engagement time is 10 seconds"), cookie overrides and consent settings. Google warns that "The changes you make here could affect other Google tags loaded on the same page."
- Measurement Protocol API secrets: created per stream for server-to-GA4 events; see our Measurement Protocol guide.
- Data redaction: removes email addresses and chosen URL query parameters before events are sent. "Data redaction is currently available only for web data streams", and "When you create a new property, email data redaction is on by default." Google adds that "the ultimate responsibility for meeting regulatory requirements still lies with the entity collecting data".
- Modify and create events: also stream-level. "If you have multiple streams connected to your Google Analytics property, you will be asked to choose which stream you want to create or modify your events in." How those rules work is in our guide to modifying and creating events.
Not everything is on the stream. Key events, custom dimensions, data retention and product links such as the BigQuery export are set on the property.
One stream or several?
Google's examples in the account structure guide come down to a few rules:
- One website: one property with one web stream. If the business also has an app, add "a separate data stream for the app".
- A journey across several domains, such as a site plus a separate booking or shop domain: "use a single web data stream combined with cross domain measurement." Google gives the reason: "consistent user and session reporting".
- An app on iOS and Android: one stream per platform in the same property. "A separate data stream for each app implementation makes it possible to isolate iOS vs Android data."
- Separate businesses or brands: Google's examples give each one its own property, each with its own web stream and app streams, rather than many streams in one property.
Staging and test sites are a different case. Google doesn't cover them in these articles; see our approach below.
One more limit to plan around: a GA4 property can link only one data stream to Search Console (see one property, one stream).
Deleting a stream
"If you delete a data stream, Analytics preserves the historical data, but there is no further processing of that data, nor can you use that data in report filters." So delete only a stream you are sure you won't need to filter or compare again.
How we set up streams
This part is our own practice, not Google guidance. For a typical client site we create one web stream named after the site, keep enhanced measurement on, check the form events, and record the measurement ID and stream ID in the handover notes. When a stream is no longer used, we remove its tag from the site rather than delete the stream, so its history stays usable in reports. When the site sends visitors to another domain we own, such as a booking tool, we add that domain to the same stream's cross-domain list instead of creating a second stream.
For staging sites we either leave GA4 off or point them at a separate test property, so test traffic never reaches the live reports. For apps we add the iOS and Android streams to the same property as the website when the client wants web and app in one report, and we use the Firebase project that the app team already has.
Frequently asked questions
How many data streams can a GA4 property have?
Up to 50, in any mix of web and app streams, of which at most 30 can be app streams. Google's account structure guide recommends no more than three: one web stream and one stream each for iOS and Android.
Is the measurement ID the same as the stream ID?
No. The measurement ID starts with G- and is what the Google tag uses; the stream ID is a separate number shown in the stream details. Measurement Protocol requests, for example, need the measurement ID.
Should each of my websites get its own data stream?
Not if they belong to one user journey. Google says to use a single web stream with cross-domain measurement for journeys that span domains. Separate businesses are better served by separate properties.
What happens to the data if I delete a data stream?
Google says Analytics keeps the historical data, but it is no longer processed and you can't use it in report filters.
Do I need an app data stream for a mobile app?
Yes, one per platform: an iOS stream and an Android stream. Adding an app stream in GA4 creates a matching Firebase project and app, and the app sends data through the Firebase SDK.