Connect Firebase to Google Analytics

Starting from Google Analytics

Create a Google Analytics 4 property

To measure app data in Analytics, you need to create a corresponding project in Firebase and establish a link between that project and your property.

Learn more about creating a Google Analytics 4 property

Note: You can only link one Firebase project to a single Google Analytics 4 property. This means that all your apps within that Firebase project send data to only one property.

Update settings after creating the link

After you create a Google Analytics 4 property and establish the link to your Firebase project, you have options to:

  • Adjust the access level for Firebase users to Analytics data
  • Turn off enhanced audience integration (the feature is on by default)

To open these settings:

  1. In Admin, under Product links, click Firebase links.
    Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Editor or above at the property level to open these settings.
  2. Find the row for the relevant Firebase project ID.

User access (roles in Analytics)

Firebase project users are automatically granted Analytics roles when you link a Firebase project to an Analytics property:

  • Firebase users in a project, based on their highest Firebase firebaseanalytics permission, are assigned to one of four Firebase linked users:
    • Firebase project <project number> Editor
    • Firebase project <project number> Marketer
    • Firebase project <project number> Viewer (no data restrictions)
    • Firebase project <project number> Viewer (no access to cost or revenue data)
  • The Firebase linked users are in turn assigned to default roles in the linked Analytics property.
If you have this Firebase role/permission You are assigned to this Firebase linked user Which is assinged this Analytics role

firebaseanalytics.resources.googleAnalyticsEdit

Firebase project <project number> Editor

Editor

No data restrictions

firebaseanalytics.resources.googleAnalyticsAdditionalAccess Firebase project <project number> Marketer Marketer

firebaseanalytics.resources.googleAnalyticsReadAndAnalyze

Firebase project <project number> Viewer

Viewer

No data restrictions

firebaseanalytics.resources.googleAnalyticsRestrictedAccess Firebase project <project number> Viewer

Viewer

No access to cost or revenue data

If you linked your Firebase project to a Google Analytics 4 property before January 4, 2023, the Firebase linked users may have different roles and data access in Analytics than described in the table above. Analytics administrators can verify and edit roles and data access from Admin > linked property > Property Access Management.

In Analytics access management, each Firebase linked user represents a group of users in the linked Firebase project.

As an Analytics Administrator, you can change the Analytics role and data restrictions that are assigned to a property's Firebase linked users. If you change the Analytics role and data restrictions assigned to a Firebase linked user, you affect everyone in the Firebase project that is assigned to that linked user.

The role assignments and data restrictions persist until the link between the Firebase project and the Analytics property is deleted.

Analytics Administrators can edit access for the Firebase roles in Admin > linked property > Property Access Management.

For example, you can restrict access to cost and revenue data in the Firebase Console, if users in the Firebase project don't need to see that information:

  1. In Admin, under Property, click Property Access Management.
    Note: The previous link opens to the last Analytics property you accessed. You can change the property using the property selector. You must be an Administrator at the property level to restrict access.
  2. Click the row for the Firebase user whose data access you want to restrict.
  3. Under Data restrictions, select No Cost Metrics and/or No Revenue Metrics.

Enhanced audience integration

Enhanced audience integration provides the following benefits:

The feature is on by default after you create the link. Turn the feature off if necessary.

Starting from Firebase

If you previously enabled Analytics for your Firebase project, then when you upgrade your project, your project is automatically linked to a Google Analytics 4 property.

If you did not initially enable Analytics for your project but choose to later, then you have the option to automatically create a new Google Analytics 4 property or you can link to an existing Google Analytics 4 property.

Note: If you unlink a Firebase project from a Google Analytics 4 property in the Firebase console, it stops sending data to GA4, disabling Analytics tracking for that project.

To use the option to automatically create a new Google Analytics 4 property, you need to have the Firebase permission firebaseanalytics.resources.googleAnalyticsEdit, which is included in the Firebases roles Owner, Editor, and Firebase Admin.

Create a project

When you create a project in Firebase, you have the option to integrate with Analytics. If you already have one or more Google Analytics accounts, you can associate your project with one of those. If you do not already have a Google Analytics Account, a new one will be created for you with the name Default Account for Firebase.

Firebase users who have access to that project are given Analytics user role based on their Firebase roles (see User access above).

Link your Firebase project to Analytics

Firebase Owners can set up and manage the Analytics link under Project Settings > Integrations.

It may take 24 hours after linking Firebase and Analytics for data to flow between the products. This may affect features like A/B Testing, Crash Reporting, and user segmentation and targeting.
Google Analytics 4 will only show Firebase data after you link a Google Analytics 4 property to Firebase.

Set up a new Analytics link

  1. Open your Firebase project.
  2. Open Project settings > Integrations.
  3. On the Google Analytics card, click Link.
  4. Select an Analytics Account or create a new one.
    • If you select an existing account, you have the option to select an existing Google Analytics 4 property in that account or to create a new property.
    • If you create a new account, then a new Google Analytics 4 property is created for you and your project is linked to that property.
  5. Configure your Analytics settings.

Edit an Analytics link

  1. Open your Firebase project.
  2. Open Project settings > Integrations.
  3. On the Google Analytics card, click View link.
  4. Remove the existing Analytics link.
  5. Follow the instructions for setting up a new Analytics link.

Relink your Firebase project

If you had previously linked your Firebase project with your Analytics account but are no longer able to locate your Firebase project in Analytics:

  1. Open your Firebase project.
  2. Open Project settings > Integrations.
  3. Click the Analytics card to link Analytics to your project.

Unlink Analytics from your Firebase project

Firebase Owners can unlink Analytics under Project Settings > Integrations.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
15108852560640157551
true
Search Help Center
true
true
true
true
true
69256
true
false