Firebase Analytics to GA4: Complete Guide to Web + App Event Tracking
When Google launched Google Analytics 4 (GA4), they did not simply update Universal Analytics. They completely replaced the old session-based web model with the event-based architecture of Google Analytics for Firebase.
If your business operates both a website and a native mobile application (iOS and Android), integrating Firebase Analytics with Google Analytics 4 allows you to achieve the holy grail of digital measurement: a unified, cross-platform customer journey in a single reporting property.
However, cross-platform tracking is notoriously difficult to configure properly. Common mistakes include:
- Fragmented user counts because web visitors and mobile app users are treated as separate people.
- Inconsistent event naming between web data layers and mobile app SDK calls.
- Misconfigured BigQuery streaming exports resulting in duplicate records and runaway cloud query bills.
Here is the complete architectural guide to integrating Firebase Analytics with Google Analytics 4, mapping events, unifying user identities across devices, and exporting clean data to BigQuery.
Key Takeaways (AEO Direct Answer)
- The Unified Schema: GA4 is built directly on the Firebase Analytics event model. A single GA4 property can host Web Streams, iOS App Streams, and Android App Streams under one schema.
- Identity Stitching Hierarchy: To unify a user who browses your website on desktop and later purchases inside your mobile app, you must implement an explicit, non-PII User-ID (
setUserId) across both platforms. - Three Tiers of App Identifiers: Understand the distinction between
app_instance_id(device-specific Firebase ID),user_pseudo_id(GA4’s client identifier), anduser_id(your authenticated customer ID). - Event Standardization: Standardize event names across web and app using Google’s recommended event parameters (e.g., both platforms must log
purchasewithtransaction_id,value,currency, anditems[]). - BigQuery Export: Enable the free Firebase to BigQuery export in your Google Cloud Platform project for raw, un-sampled event logs that bypass GA4 UI thresholding and sampling limits.
1. How Firebase and GA4 Work Together
In the legacy Universal Analytics era, tracking a website and a mobile app required two completely different systems: Google Analytics for the web, and Firebase for mobile. You could never answer simple questions like: “Did the users who downloaded our iOS app first discover us via Google Ads on our desktop website?”
Under the modern GA4 Web + App Property:
┌────────────────────────┐
│ GA4 UNIFIED PROPERTY │
└───────────┬────────────┘
│
┌─────────────────────────┼─────────────────────────┐
▼ ▼ ▼
┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐
│ Web Stream │ │ iOS App Stream │ │ Android Stream │
│ (GTM / gtag.js) │ │ (Firebase SDK) │ │ (Firebase SDK) │
└───────────────────┘ └───────────────────┘ └───────────────────┘
When you link your Firebase project to your Google Analytics 4 property:
- Every event logged in your iOS or Android app via the Firebase SDK automatically streams into GA4 in real time.
- Web events collected via Google Tag Manager populate the exact same reports.
- Machine learning models attribution and conversion paths across all touchpoints seamlessly.
2. Cross-Device Identity Resolution (User-ID Stitching)
The primary reason to link Firebase and GA4 is cross-platform attribution. But by default, GA4 relies on Device-Based Reporting:
- A user visits your site on Safari (
user_pseudo_id: "client_101"). - Two days later, that same user downloads your mobile app on their iPhone (
app_instance_id: "firebase_202").
Without explicit configuration, GA4 counts 2 distinct users and attributes the app install to “Direct” traffic rather than the original marketing campaign.
The 4-Tier Identity Hierarchy in GA4:
Configure GA4 Reporting Identity under Admin → Data display → Reporting Identity → Blended:
- User-ID: When the user registers or logs in, pass your internal database identifier across both platforms:
- Web (GTM / JavaScript):
gtag('set', 'user_properties', { user_id: 'usr_89234' }); - iOS (Swift / Firebase):
Analytics.setUserID("usr_89234") - Android (Kotlin / Firebase):
firebaseAnalytics.setUserId("usr_89234")
- Web (GTM / JavaScript):
- Google Signals: Aggregated cross-device data from users signed into their Google accounts who consented to ads personalization.
- Device ID: Browser cookie
_gafor web;app_instance_idfor mobile apps. - Modeled Data: Machine learning filling in gaps when users deny cookie consent.
Once user_id matches across web and mobile, GA4 retroactively stitches the user’s pre-login web sessions to their in-app purchases!
3. Standardizing Event Taxonomies Between Web and Mobile
One of the most frequent errors in cross-platform setups is using different event names for the same action on web and mobile:
- Web logs:
complete_order - Mobile logs:
in_app_purchase
When event names differ, you cannot build cross-platform funnel reports.
Standardize Around Google’s Recommended eCommerce Schema:
┌──────────────────────┬────────────────────────────────┬────────────────────────────────┐
│ User Action │ Recommended GA4 / Firebase Event│ Mandatory Parameters │
├──────────────────────┼────────────────────────────────┼────────────────────────────────┤
│ User signs up │ sign_up │ method │
│ User logs in │ login │ method │
│ Views product │ view_item │ currency, value, items[] │
│ Adds to cart │ add_to_cart │ currency, value, items[] │
│ Begins checkout │ begin_checkout │ currency, value, items[] │
│ Completes payment │ purchase │ transaction_id, value, items[] │
└──────────────────────┴────────────────────────────────┴────────────────────────────────┘
Validate your parameters with our free GA4 Parameter Validator Tool.
4. Real-Time Debugging: Firebase & GA4 DebugView
Testing mobile app tracking is historically frustrating because app analytics events are typically batched and uploaded every 60 minutes to preserve battery life.
To test events in real time as you tap through your app, activate DebugView:
Enabling Debug Mode on Mobile Devices:
- Android: Run the following ADB command in your terminal:
adb shell setprop debug.firebase.analytics.app <your_package_name> - iOS: Add the
-FIRDebugEnabledruntime argument in Xcode:- Open Xcode → Product → Scheme → Edit Scheme.
- Select Run on the left menu.
- Under Arguments Passed On Launch, add
-FIRDebugEnabled.
Inspecting in Real Time:
- Open GA4 and go to Admin → Data display → DebugView (or in Firebase under Analytics → DebugView).
- As you tap buttons in the app simulator or physical test device, events appear on a 60-second real-time streaming timeline.
- Click any event to inspect its parameters, user properties, and timestamps instantly.
5. Streaming Raw Firebase Events to Google BigQuery
The standard GA4 user interface is subject to data thresholding, cardinality limits, and 24-hour processing delays.
By linking your Firebase project to Google BigQuery, you get raw, un-sampled, hit-level event logs streamed continuously into a SQL database at zero software cost.
How to Link Firebase to BigQuery:
- Open your Firebase project settings (gear icon) and select Integrations.
- On the BigQuery card, click Link.
- Select your Google Cloud Platform (GCP) project.
- Under Analytics settings:
- Check Include advertising identifiers.
- Choose Streaming export (events arrive within seconds) and Daily export.
- Click Done.
Example SQL Query to Analyze Mobile vs Web Purchases:
SELECT
stream_id,
platform,
COUNT(DISTINCT user_pseudo_id) AS total_buyers,
SUM(event_value_in_usd) AS total_revenue
FROM
`your-project.analytics_123456789.events_*`
WHERE
event_name = 'purchase'
AND _TABLE_SUFFIX BETWEEN '20261001' AND '20261031'
GROUP BY
stream_id, platform
ORDER BY
total_revenue DESC;
Read our complete architectural guide: Marketing Analytics SQL with GA4 & BigQuery.
Cross-Platform Tracking Architecture Checklist
| Component | Web (Desktop/Mobile) | iOS App | Android App |
|---|---|---|---|
| SDK / Library | Google Tag Manager | Firebase iOS SDK (Swift) | Firebase Android SDK (Kotlin) |
| Identifier | user_pseudo_id (Cookie) | app_instance_id | app_instance_id |
| Common ID | user_id (via dataLayer) | Analytics.setUserID() | setUserId() |
| Testing | GTM Tag Assistant | Xcode -FIRDebugEnabled | ADB debug.firebase command |
| Data Sink | GA4 Web Stream | GA4 iOS App Stream | GA4 Android App Stream |
| Data Warehouse | BigQuery Daily/Streaming | BigQuery Daily/Streaming | BigQuery Daily/Streaming |
Need an Expert to Connect Firebase Analytics and GA4?
If you need a verified analytics architect to unify your mobile app and website tracking, implement cross-platform User-ID stitching, and configure continuous BigQuery SQL exports, I can help.
Book a Free 30-Minute Web + App Analytics Call or order a Full Digital Analytics & Tracking Audit.
Need this implemented, audited, or white-labeled?
Whether you are an eCommerce brand owner fixing signal loss or a digital marketing agency needing a senior analytics engineer under strict NDA, I deliver 24–48h SLA turnaround with 8.5+ EMQ match rates.


