GA4 Firebase Integration – Correctly add App data streams to GA4 property

Last Updated: November 30, 2022

What is Firebase?

Firebase is a mobile app development platform.

firebase

We use Firebase to add mobile app data streams to our GA4 property.

Firebase provides many products and extensions (both free and paid) to build, release and monitor apps as well as optimize your app experience for user engagement.

How to use Firebase?

In order to use Firebase, you would need to create and use one or more projects. These projects are called Firebase Projects.

You can create a new Firebase project via Firebase Console.

In order to use a Firebase project, you would need to add/register one or more apps to it.

These apps could be your mobile apps (IOS, Android) and/or your web apps.

Note: Firebase project acts as a container for all the registered apps.

All the apps registered to the same Firebase project share and have access to all the same resources and services provisioned for the project.

For example,

All Apps registered to the same Firebase project are associated with the same GA4 property, where each Firebase App is a separate data stream in that property.

Similarly,

All Apps registered to the same Firebase project share the same backends (like Firebase Hosting, Authentication, Realtime Database, Cloud Storage etc).

Relationship between a Firebase project and Google Cloud Project

A Firebase project is actually a Google cloud project that has additional Firebase-specific configurations and services enabled for it.

Since a Firebase project is a Google Cloud project what that means:

  1. Whenever you create a new Firebase project in the Firebase console, you are also creating a Google Cloud project in the background.
  2. Whenever you delete a Firebase project in the Firebase console, you also delete the corresponding Google Cloud project in the background.
  3. You can interact with your Firebase project via Firebase Console, Google Cloud Console and Google APIs Console.
  4. Billing, permissions and unique identifiers (like project name, project ID) for a Firebase project are shared across Firebase and Google Cloud.
  5. You can use products and APIs from both Firebase and Google Cloud in a Firebase project.
  6. You may need to use Google Cloud Console (instead of the Firebase Console) for certain tasks or products related to your Firebase project.

Planning Firebase GA4 Integration Setup

In order to send mobile app data to your GA4 property, you would need to link your Firebase project to your GA4 property.

However, your Firebase GA4 integration set-up would depend upon your current situation. 

Your current situation could be one of the following:

  1. You own mobile app(s) but not a website.
  2. You own both mobile app(s) and a website.
  3. You do not own a mobile app but you own a website.

You own mobile app(s) but not a website

#1 Your current situation -> You own mobile app(s) but not a website. You don’t have either the Firebase project or the GA4 property.

Recommended implementation path

1) Create a new firebase project.

2) Add firebase to your mobile apps (Android App, Apple App)

3) Link your Firebase project to Google Analytics. When you link your Firebase project to Google Analytics, you get the option to either create a new GA4 property or to link to an existing GA4 property.

4) Create new GA4 property from within the Firebase.

The moment your firebase project is connected to your new GA4 property, Google will automatically create corresponding mobile app data streams in your GA4 property.

So you don’t need to create mobile app data streams manually in your GA4 property.

Note: You don’t need to create a web data stream in your GA4 property as you don’t own a website.

#2 Your current situation -> You own mobile app(s) but not a website. You have the Firebase project but not the GA4 property.

Recommended implementation path

1) Open the Firebase project you want to connect to the GA4 property.

2) Make sure that firebase is added to your mobile apps.

3) Link your Firebase project to Google Analytics. When you link your Firebase project to Google Analytics, you get the option to either create a new GA4 property or to link to an existing GA4 property.

4) Create new GA4 property from within the Firebase.

#3 Your current situation -> You own mobile app(s) but not a website. You have both the Firebase project and GA4 property.

Recommended implementation path

1) Open your Firebase project you want to connect to your existing GA4 property.

2) Make sure that Firebase is added to your mobile apps.

3) Link your Firebase project to Google Analytics. When you link your Firebase project to Google Analytics, you get the option to either create a new GA4 property or to link to an existing GA4 property.

4) Link to your existing GA4 property.

You own both mobile app(s) and a website

#1 Your current situation -> You own both mobile app(s) and a website. You don’t have either the Firebase project or the GA4 property.

Recommended implementation path

1) Create a new firebase project.

2) Add firebase to your mobile apps (Android App, Apple App).

3) Create new GA4 property from within the GA user interface. 

4) Add a new web data stream to your GA4 property.

5) Navigate back to your Firebase project and then link your Firebase project to your existing GA4 property. 

When you link your Firebase project to Google Analytics, you get the option to either create a new GA4 property or to link to an existing GA4 property.

6) Link to your existing GA4 property.

REMEMBER: The moment your firebase project is connected to your GA4 property, Google will automatically create corresponding mobile app data streams in your GA4 property.

So you don’t need to create mobile app data streams manually in your GA4 property.

#2 Your current situation -> You own both mobile app(s) and a website. You have the Firebase project but not the GA4 property.

Recommended implementation path

1) Open the Firebase project you want to connect to a GA4 property.

2) Make sure that Firebase is added to your mobile apps.

3) Create new GA4 property from within the GA user interface. 

4) Add a new web data stream to your GA4 property.

5) Navigate back to your Firebase project and then link your Firebase project to your existing GA4 property. 

When you link your Firebase project to Google Analytics, you get the option to either create a new GA4 property or to link to an existing GA4 property.

6) Link to the existing GA4 property.

#3 Your current situation -> You own both mobile app(s) and a website. You have both the Firebase project and the GA4 property.

Recommended implementation path

1) Open the Firebase project you want to connect to your existing GA4 property.

2) Make sure that Firebase is added to your mobile apps.

3) Navigate to your existing GA4 property and make sure that a web data stream is added to it.

4) Navigate back to your Firebase project and then link your Firebase project to your existing GA4 property. 

When you link your Firebase project to Google Analytics, you get the option to either create a new GA4 property or to link to an existing GA4 property.

5) Link to the existing GA4 property.

You do not own a mobile app but you own a website

#1 Your current situation -> You do not own a mobile app but you own a website. You don’t have either the Firebase project or the GA4 property.

Recommended implementation path

1) You don’t need a firebase project as you don’t own a mobile app.

2) Create new GA4 property from within the GA user interface. 

3) Add a new web data stream to your GA4 property.

#2 Your current situation -> You do not own a mobile app but you own a website. You don’t have the Firebase project but you have the GA4 property.

Recommended implementation path

1) You don’t need a firebase project as you don’t own a mobile app.

2) Add a new web data stream to your GA4 property.

Create a new Firebase Project

Before you can add Firebase to your Apple and Android apps, you would first need a Firebase project.

If you don’t already have a Firebase project then you would need to create one.

Follow the steps below to create a new firebase project:

Step-1: Navigate to the Firebase console while logged in to your Google account: https://console.firebase.google.com/

Note: Use that Google account which is also connected to your GA4 property.

Step-2: Click on the ‘Create a project’ button:

create a project firebase

Step-3:

  1. Give your project a name
  2. Read and accept the Firebase terms
  3. Click on the check box ‘I confirm that I will use Firebase exclusively for purposes relating to my trade, business, craft or profession’.
  4. Click on the ‘Continue’ button.
firebase project name

Step-4: Turn off the button ‘Enable Google Analytics for this project’ and then click on the ‘Create Project’ button:

create project firebase

We would connect Firebase to Google Analytics later on.

Step-5: Click on the ‘Continue’ button:

your new project is ready

Now we would add Firebase to our mobile apps (Apple and Android apps).

Add Firebase to your Apple App

Follow the steps below to add Firebase to your Apple App:

Step-1: Go through the official documentation on how to add Firebase to your Apple Project.

You would need the help of a mobile app developer here.

Step-2: Navigate to the ‘project overview‘ page of your Firebase Console and then click on the ‘iOS+’ button:

add ios app firebase

Step-3:

  1. Add Apple Bundle ID (You can find your bundle identifier in the ‘General’ tab for your app’s primary target in Xcode)
  2. Add App nickname (this name would be used throughout the Firebase console to represent this app. Note: Nicknames aren’t visible to users).
  3. Add your App Store ID (You can find your App Store ID in your app’s URL. In the example below, 123456789 is the App Store ID. https://itunes.apple.com/us/app/yourapp/id123456789 ).
  4. Click on the ‘Register App’ button.
add firebase to your apple app

Step-4: Download the configuration file and then click on the ‘Next’ button:

down configuration file apple app

Step-5: Follow the on-screen instructions to add the Firebase SDK to your IOS app and then click on the ‘Next’ button:

add firebase sdk

Step-6: Add the relevant initialization code to your app’s main entry point:

add initialization code

Step-7: Scroll down and then click on the ‘Next’ button:

next button 4

Step-8: Click on the ‘Continue to Console’ button:

continue to console button

Congratulations! 

You have successfully added Firebase to your Apple app. 

You should now see your IOS app added to the project overview page:

ios app added to firebase project

Add Firebase to your Android App

Follow the steps below to add Firebase to your Android App:

Step-1: Go through the official documentation on how to add Firebase to your Android Project

You would need the help of a mobile app developer here.

Step-2: Navigate to the project overview page of your Firebase Console and then click on the ‘+Add app’ button:

add app firebase

Step-3: Click on the ‘Android’ button:

android button

Step-4:

  1. Add Android Package name (Your package name is generally the applicationID in your app-level build.gradle file)
  2. Add App nickname (this name would be used throughout the Firebase console to represent this app. Note: Nicknames aren’t visible to users).
  3. Add Debug signing certificate SHA-1 (optional) (See this page for information on using keytool to get the SHA-1 hash of your signing certificate ).
  4. Click on the ‘Register App’ button.
add firebase to your android app

Step-5: Download the configuration file and then click on the ‘Next’ button:

down configuration file android app

Step-6: Follow the on-screen instructions to add the Firebase SDK to your Android app:

add firebase sdk android app

Step-7: Scroll down and then click on the ‘Next’ button:

next button android app

Step-8: Click on the ‘Continue to Console’ button:

You have successfully added Firebase to your Android app

Congratulations! 

You have successfully added Firebase to your Android app. 

You should now see your Android app added to the project overview page:

Android app added to the project overview page

The correct way to add the mobile app data streams to a GA4 property

Many people add mobile app data streams from the user interface of the GA4 property:

add mobile app data streams 1

But this is not the correct way.

When you create a mobile app stream from a GA4 property, you do not get the option to link to an existing Firebase project.

Instead, the following things happen automatically:

1) A new Google cloud project is automatically created.

2) A new Firebase project is automatically created.

3) The new firebase project is automatically connected to your GA4 property.

And your mobile apps are most likely not added to this new Firebase project.

What you should do instead is to find and link your existing firebase project (to which you added your mobile apps) to your GA4 property:

GA4 Firebase Integration

The moment your firebase project is connected to your existing GA4 property, Google will automatically create corresponding mobile app data streams in your GA4 property.

Advantages of connecting Firebase project to GA4 property

Following are the key advantages of linking your Firebase project to your GA4 property:

#1 The moment your firebase project (to which mobile apps have been added) is connected to your GA4 property, Google will automatically create corresponding mobile app data streams in your GA4 property.

#2 Firebase GA4 integration allows you to combine mobile app and website data into one GA4 reporting view.

#3 You get access to a wide range of GA4 exploration report templates (like free form, funnel exploration, path exploration etc) which are not available in Firebase Analytics.

Connect your Firebase project to your GA4 property (GA4 Firebase Integration)

Follow the steps below to connect an existing Firebase project to an existing GA4 property:

Step-1: Navigate to Firebase Console: https://console.firebase.google.com/

Step-2: Click on the Firebase project you want to connect to your existing GA4 property: 

Click on the Firebase project

Step-3: Make sure that the Firebase is added to your mobile apps:

mobile apps

Step-4: Click on the wheel next to ‘Project Overview’:

Project Overview

Step-5: Click on ‘Project Settings’:

Project Settings

Step-6: Click on the ‘Integrations’ tab:

Integrations

Step-7: Click on the ‘Enable’ button under ‘Google Analytics’:

enable google analytics in firebase

Step-8: Select your Google Analytics account from the drop-down menu:

Select your Google Analytics account

Step-9: Click on the pencil icon next to ‘Automatically create a new property in this account’:

Automatically create a new property in this account

You should now see a screen like the one below:

You should now see a screen like the one below

Step-10: Select your GA4 property from the ‘Analytics property’ drop-down menu and then click on the ‘Enable Google Analytics’ button:

Analytics property

As soon as you clicked on the ‘Enable Google Analytics’ button two new mobile app data streams will be automatically be created in the background in the selected GA4 property:

two new mobile app data streams will be automatically be created in the selected GA4 property

Step-11: Click on the Finish button:

Click on the Finish button

Congratulations!

Your Firebase project is now successfully connected to your GA4 property.

Your Firebase project is now successfully connected to your GA4 property

This new connection between your firebase project and GA4 property would enable data flow between firebase and GA4. 

Note: The data exported from your GA4 property into your Firebase project is subject to the Firebase terms of service. Similarly, the data exported from your Firebase project to your GA4 property is subject to the Google Analytics terms of service.

#1 Google Analytics 4 Intro

  1. What is GA4 (Google Analytics 4) – The Apps + Web Property?
  2. Key Benefits of Using Google Analytics 4 (GA4)
  3. Setup GA4 – Upgrade to GA4 – Implementation Guide
  4. Google Analytics 4 (GA4) vs Universal Analytics – What is the Difference?
  5. GA4 vs GA4 360 – Pricing, Limits, Billing and More
  6. Google Analytics 4 Training & Tutorial with FREE GA4 ebook

#2 Google Analytics 4 Property

  1. Google Analytics Account Hierarchy (Structure Explained)
  2. Understanding Google Analytics Measurement ID (GA4)
  3. Google Signals GA4 – See Demographics (Gender, Age) in Google Analytics 4
  4. Using the GA4 (Google Analytics 4) Test Property
  5. Google Analytics 4 Sub Properties Tutorial
  6. Roll up Property in Google Analytics 4 (GA4) – Tutorial

#3 Google Analytics 4 Integrations

  1. How to connect GA4 (Google Analytics 4) with Google Data Studio
  2. How to link GA4 (Google Analytics 4) with Google Ads
  3. How to link Google Search Console to Google Analytics 4 (GA4)
  4. How to Install Google Analytics 4 on Shopify
  5. GA4 Firebase Integration – Correctly Add App Data Streams to GA4 Property

#4 Google Analytics 4 Events

  1. GA4 (Google Analytics 4) Event Tracking Setup Tutorial
  2. Understanding Event Parameters in Google Analytics 4 (GA4)
  3. Recommended Events in Google Analytics 4 (GA4)
  4. Enhanced Measurement Events in Google Analytics 4 (GA4)
  5. Automatically Collected Events in Google Analytics 4 (GA4)
  6. How to Set Up GA4 Custom Events via Google Tag Manager
  7. Events Report in Google Analytics 4 (GA4)
  8. How to Rename Events in Google Analytics 4 (GA4)
  9. How to Use Google Analytics 4 Event Builder
  10. GA4 Form Interactions Tracking – Enhanced Measurement

#5 Google Analytics 4 Conversions

  1. Google Analytics 4 Conversion Tracking Guide – GA4 Goals
  2. How to Import Conversions from GA4 Property to Your Google Ads account
  3. GA4 Conversion Rate – How to find it and use it

#6 Google Analytics 4 Dimensions

  1. GA4 (Google Analytics 4) Dimensions Tutorial
  2. GA4 (Google Analytics 4) Custom Dimensions Tutorial
  3. GA4 User Properties (User Scoped Custom Dimensions) – Tutorial
  4. Event Scoped Custom Dimensions in GA4 – Tutorial

#7 Google Analytics 4 Metrics

  1. GA4 (Google Analytics 4) Metrics Tutorial with Free Google Analytics 4 Ebook
  2. GA4 (Google Analytics 4) Custom Metrics Tutorial
  3. What are Predictive Metrics in Google Analytics 4 (GA4)

#8 Google Analytics 4 Ecommerce

  1. GA4 (Google Analytics 4) Ecommerce Tracking via GTM – Tutorial

#9 Google Analytics 4 Specialized Tracking

  1. GA4 (Google Analytics 4) Enhanced Measurement Tracking Tutorial
  2. Cross Domain Tracking in GA4 (Google Analytics 4) Setup Guide
  3. GA4 Site Search – Tracking Site Search in Google Analytics 4
  4. GA4 (Google Analytics 4) Scroll Tracking Tutorial
  5. Self-referral Google Analytics 4 – Referral exclusion GA4
  6. GA4 (Google Analytics 4) Data Import Tutorial
  7. Google Analytics 4 Content Grouping – Create Content Groups in GA4
  8. How to Track Single Page Apps in Google Analytics 4 (GA4)
  9. utm_source, utm_medium, utm_campaign Parameters – GA4 (Google Analytics 4)
  10. GA4 Form Tracking via Google Tag Manager

#10 Google Analytics 4 filters

  1. GA4 filters – Understanding Data Filters in Google Analytics 4
  2. How to Create and Test Filters in Google Analytics 4 (GA4)?
  3. Exclude Internal Traffic in GA4 (Google Analytics 4) via IP Filter

#11 Google Analytics 4 Explorations

  1. Free Form Report in GA4 (Google Analytics 4) – Exploration Report
  2. How to Use the User Lifetime Report in Google Analytics 4 (GA4)
  3. How to Use Path Exploration Report in GA4 (Google Analytics 4) – Path Analysis
  4. How to Use Segment Overlap Report in Google Analytics 4 (GA4)
  5. How to Use the Funnel Exploration Report in GA4 (Google Analytics 4) – Funnel Analysis
  6. Cohort Exploration Report in Google Analytics 4 (GA4)
  7. How to Create Landing Pages Report in GA4 (Google Analytics 4)
  8. How to Create Google Ads report in GA4 (Google Analytics 4)
  9. How to Segment GA4 Data by Data Stream
  10. Organic Search Traffic Analysis in GA4 – Complete Guide
  11. Google Analytics 4 (GA4) Outbound Links Tracking
  12. How to Track Email Campaigns and Traffic in GA4 

#12 Google Analytics 4 Advanced

  1. Understanding Google Analytics 4 Sessions
  2. GA4 (Google Analytics 4) Measurement Protocol Tutorial
  3. How to Build Comparisons (Advanced Segments) in Google Analytics 4 (GA4)
  4. Understanding Automated Insights in Google Analytics 4 (GA4)
  5. Understanding Channel Groupings in Google Analytics 4 (GA4)
  6. Understanding Data Sampling in Google Analytics 4 (GA4)

#13 Google Analytics 4 Reports

  1. How to Create Custom Insights in Google Analytics 4 (GA4)
  2. How to Use Debug View Report in Google Analytics 4 (GA4)

#14 Google Analytics 4 Attribution

  1. Guide to Attribution Models in GA4 (Google Analytics 4)
  2. How to Change Attribution Models in GA4 (Google Analytics 4)?
  3. GA4 (Google Analytics 4) Conversion Paths Report in Attribution
  4. GA4 (Google Analytics 4) Model Comparison Report in Attribution
  5. Advertising Snapshot in GA4 (Google Analytics 4) Attribution
  6. GA4 Attribution Modelling Tutorial

#15 Google Analytics 4 Audiences

  1. GA4 Audiences – Creating Custom Audience in Google Analytics 4
  2. How to Create a Remarketing Audience in Google Analytics 4 (GA4)
  3. Understanding Audience Triggers in Google Analytics 4 (GA4)
  4. Google Analytics 4 (GA4) Predictive Audiences – Tutorial

#16 Google Analytics 4 BigQuery

  1. GA4 BigQuery – Connect Google Analytics 4 with BigQuery
  2. BigQuery GA4 Schema – Send Custom GA4 Data to BigQuery
  3. How to Backfill GA4 Data in BigQuery
  4. How to Connect and Export Data from GA4 to BigQuery

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade

Learn and Master Google Analytics 4 (GA4) - 126 pages ebook

X
error: Alert: Content is protected !!