GMP Hub

Google Analytics 4 & Firebase: The Evolution of Mobile App Measurement

The transition to Google Analytics 4 is a major move for GA users. Firebase users, however, will find the shift to be pretty straightforward and will quickly realize the benefits of all of GA’s web tracking capabilities stacked on top of Firebase for a richer data set. 

In this blog post, I’ll outline: 

  • The evolution of Google Analytics, with a focus on mobile app measurement
  • Approaches for implementing bi-directional mobile app analytics in GA4 and Firebase
  • Important analysis and optimization features that each platform offers

Register for our upcoming Live Google Analytics 4: Ask Me Anything Webinar

Timeline and Terminology

To start, let’s review a basic timeline for Google’s mobile app tracking solutions and level-set on the names of the platforms themselves.

2012: Google Universal Analytics

The dominant version of Google Analytics from 2012 to 2020, Universal is no longer the default property type when you’re setting up a new GA property.

Universal was designed principally for website tracking, but for some time it was offered as Google’s primary solution for mobile app tracking as well. With the sunsetting of the Google Analytics Services SDK for non-Google Analytics 360 (i.e.Google Analytics free) properties in 2019/2020, tracking from mobile apps to Universal became significantly more restricted.  

At least in the near term, you can still track from an Android or iOS mobile app to a 360 (i.e., paid) Google Universal Analytics property using the Google Analytics Services SDK, and you can likewise still track mobile activity to any Google Universal Analytics property by translating Firebase Analytics events and parameters through Google Tag Manager into Google Universal Analytics screen view and event hits.

With the current and foreseeable evolution of Google’s analytics offerings, it’s advisable to consider Google Universal Analytics deprecated for mobile app tracking and begin a measurement strategy based on Google Analytics 4 and Firebase if you haven’t already.

2014: Firebase Analytics (aka Google Analytics for Firebase)

In 2014, Google acquired Firebase, a platform of development, marketing, and data services designed primarily for mobile apps, with analytics as a central component.  

Firebase offered a fundamentally different option for tracking mobile activity. Firebase Analytics is based on a flexible and agnostic event and parameter taxonomy, vs. the mobile tracking in Google Universal Analytics, which is based on screen views and a baked-in Event Category, Event Action, and Event Label structure. The Firebase Analytics reporting UI also differs greatly from the Universal Analytics UI in terms of look, feel, and functionality.

Firebase Analytics is populated through automatic and coded calls to the Firebase API, either directly or through Google Tag Manager as the intermediary for transforming Firebase data as needed, and also for triggering and populating other marketing and measurement tags for your mobile apps.

Google renamed Firebase Analytics to Google Analytics for Firebase, but the original name has persisted, probably because it draws a clearer distinction from mobile tracking in Google Universal Analytics.

2019: Google Analytics App + Web (Renamed Google Analytics 4 in 2020)

The most recent incarnation of Google Analytics was introduced late 2019 and has since become the default Google Analytics property type.

The option to create a Google Analytics Universal property remains available, but there should no longer be much reason to do so relative to mobile app tracking requirements. (Dual tracking with both Universal and GA4 is recommended near-term for websites.)

Google Analytics 4 has directly leveraged the Firebase Analytics schema and reporting UI to offer a much more unified platform for mobile app and website tracking.

Dual Tagging

Dual tagging/tracking does not refer to tracking mobile and web activity into the same Google Analytics 4 property.

As of early 2021, dual tagging refers primarily to concurrent tracking of website activity into GA Universal and GA4.  If you’ve already been tracking your mobile apps into GA Universal and you’re getting started with Firebase tracking, there’s certainly no downside to tracking your mobile activity with both platforms near-term and taking advantage of historical continuity in GA Universal. But if you’re just getting started with mobile app tracking, or you’re already using Firebase only, there should normally be no reason to establish a separate mobile tracking stream into GA Universal.

Why GA4 Is Good News for Mobile Apps

GA4 provides a number of advantages for mobile app tracking measurement.

Same Implementation for Both Platforms

The same implementation steps can populate mobile app tracking data in a Firebase project and a GA4 property. The only slight difference lies in where you first create your Android and iOS data streams.  Data streams that you create in a GA4 property automatically sync with a new Firebase project, whereas Android and iOS data streams that you create in a Firebase project require a simple integration step to be synched with GA4.

Once you’ve implemented your mobile app tracking and the data streams are synched, you can begin to take advantage of the different capabilities that each platform offers for analysis, optimization, and marketing.

If you’re already tracking into Firebase, initiate your link to GA4 from the Firebase project settings.
When you link from Firebase to sync your Android and/or iOS data streams with GA4, you can create a new GA4 property or select an existing GA property.

GA4 has Adopted the Firebase Analytics Data Model

Android, iOS, and web data streams in Google Analytics 4 directly leverage the flexible, agnostic, event-based data model that forms the foundation of Firebase Analytics.  

As an example, if you were using GA Universal to track internal navigation within your mobile app or your website, you would send the following values (or something similar) in conformance with the predefined event model:

Event Category: main menu
Event Action: click
Event Value: about us

In Firebase and GA4, you could track this action using the event/parameter model:

event_name: main menu
menu_item: about us

The menu_item parameter has a specific intrinsic meaning, even without the context of the event name.  Many Google Analytics Universal practitioners are welcoming the switch to this more agnostic event data model.  If you are already accustomed to working with Firebase Analytics, you’ll be able to leverage the same schema for implementation and reporting in GA4, across web and mobile data streams.

Increased Limits for Custom Dimensions and Custom Metrics

The event parameters that you pass to Firebase Analytics aren’t fully available for reporting in the UI unless you map them to custom dimensions or custom metrics. While this requirement is not in itself especially intuitive, it is important to take full advantage of these custom definitions in your analysis.

Custom definitions allow you to map event parameters as custom dimensions or custom metrics. The limits increase for mobile tracking if you’ve linked your Firebase project to a Google Analytics 4 property.
Custom dimension definition.
With the event parameter mapped to a custom dimension, it becomes available in more reporting contexts.

If you are tracking mobile data into Firebase Analytics without having linked your Firebase project to a Google Analytics 4 property, you can map 10 text-string event parameters as custom dimensions and 40 numeric event parameters as custom metrics.  40 custom metrics will serve most organizations well, while 10 custom dimensions can be very limiting. A typical analytics implementation requires many more custom dimensions that custom metrics, particularly at the enterprise level.

Once you link your Firebase project to a GA4 property, you can define 50 custom dimensions and 50 custom metrics to be populated from event parameters for reporting in the UI.

Custom Definition Type Limit in Firebase Project Not Linked to GA4 Property Limit in Firebase Project Linked to GA4 Property
Custom Dimension 10 50
Custom Metric 40 50

Note that all event parameters (in their full length, even beyond the 100-char parameter limit displayed in the reporting UI) are included in the BigQuery export that you can configure either from Firebase Analytics or Google Analytics 4.

GA4 Offers Richer Reporting for Mobile App Analytics

Once you link your Firebase project to a GA4 property, you have access to a range of reporting templates for your mobile analytics data that aren’t available in the Firebase UI, including:

  • Funnel Analysis
  • Path Analysis
  • Segment Overlap

Chart formats within the GA4 Exploration template include:

  • Line Chart
  • Bar Chart
  • Donut Chart
  • Scatterplot
  • Geo Map
Many additional reporting formats are available for your mobile analytics data in GA4.

Shared Identity Spaces Between Mobile and Web Data Streams

Google Analytics 4 uses three mechanisms for identifying the same users across web, Android, and iOS data streams, thereby providing a better understanding of user behavior across platforms. 

When processing analytics data, GA4 cascades through the following fallback to identify users:

  1. user ID
    • value that you can pass explicitly to GA4 (in an Android, iOS, or web data stream)  when a user authenticates to your back end
  2. Google Signals
    • applies to users who are authenticated to Google when they’re accessing your mobile app or website
    • does not apply to users who have disabled Ads Personalization in their Google account settings
    • you need to enable Google Signals in the GA4 property admin
  3. client ID
    • the app Instance ID for mobile apps and the _ga browser cookie value for websites
    • cannot unify users across mobile and web data streams

Even though GA4 does not join mobile app and website analytics data generated by the same user on the same device by default, it does provide a unified view of users based on user ID or Google Signals. In this way, you’d be able to create a funnel, path analysis, or audience for users who complete a subscription on your website and then consume video in your mobile app.

Based on the user ID that you pass to GA4 for authenticated users and on Google Signals for users logged into Google when accessing your mobile app and website, GA4 can report on individual users across data streams.

Implementation Scenarios

The path that you take in implementing mobile app tracking in Firebase and Google Analytics 4 will depend on your requirements and the extent of existing implementations in either platform.

Your Current Tracking and Requirements Recommended Implementation Path
Mobile Web
You’re already tracking Android and/or iOS activity into Firebase. You don’t need to track a corresponding website. Starting from the Firebase admin, integrate with GA4. Even though you don’t need GA4 for web tracking in this case, you’ll still be able to take advantage of reporting templates and increased limits for custom dimensions and metrics as outlined above.
You’re already tracking Android and/or iOS activity into Firebase. You want to begin tracking web activity in GA4. Starting from the Firebase admin, set up the integration with GA4.Once you’ve created a new GA4 property as part of the integration step, create a web data stream in that GA4 property.Don’t create a new GA4 property from within the GA4 UI; you won’t be able to select your existing Firebase project to sync with.
You want to begin tracking Android and/or IOS activity. You’re already tracking a Web data stream into GA4. Create an Android and/or iOS data stream from within GA4, which will prompt you to create a new, synched Firebase property.
You’re already tracking Android and/or iOS activity into Firebase. You’re already tracking a Web data stream into GA4. Starting from the Firebase admin, set up the integration with GA4.
You’re using the Firebase SDK to generate analytics events in an Android/iOS mobile app and you’re using GTM to populate both Firebase and a Google Analytics Universal mobile view. (any of the web tracking scenarios above) While this setup is no longer recommended for a new mobile analytics implementation, you can maintain this setup in the near term to continue accessing Google Analytics Universal mobile app tracking while also building up your YoY record in Firebase/GA4.
Once mobile analytics support ends in Google Analytics Universal, you will have begun to build up a YoY mobile app analytics record in Firebase
You’re using the Google Analytics Services SDK to record directly to a GA 360 Universal mobile property. (any of the web tracking scenarios above) Since this SDK is no longer supported for free GA Universal properties, it may be a bit precarious to keep depending on it as your only mobile app analytics solution. It’s recommended to install the Firebase SDK in your app to start building up your Firebase/GA4 record. Optionally, you can add GTM to your Firebase install and continue to generate GA Universal mobile app data from GTM in parallel, as long as this capability remains available.

Installing the SDK and Sending Firebase Analytics Data

Refer to the Google documentation for SDK installation, event tracking, and debugging.

Note that event tracking for mobile apps in Firebase/GA4 can be classified as follows:

  • automatically collected events
  • recommended events
    • the Retail/Ecommerce recommended events populate the GA4 ecommerce reports
    • the other recommended events and parameters don’t yet serve a specific purpose in GA4 and are essentially handled as custom events and parameters,  but since they may serve a special reporting purpose in the future, it’s best practice to use recommended events whenever suitable – rather than fully custom events – for the interactions that you need to track
  • custom events
    • you can report as many as 500 events per app instance, so in practical terms, 500 events per Android data stream and 500 events per iOS data stream
    • events beyond the 500 limit that you include in your Firebase data stream still pass through to BigQuery (if you have configured the BigQuery export)

Google Analytics for React Native and Non-Android/iOS Mobile Apps

If you’ve developed your Android or iOS app in React Native, you can install rnfirebase to take advantage of Firebase functionality without using the SDKs directly.

SDKs are not available for non-Android and non-iOS mobile apps, but you have the option to use Measurement Protocol to track to Google Analytics 4 from any networked environment that can make basic HTTP calls.  Now that Windows mobile devices are running the Android OS, the primary use case for Measurement Protocol with mobile apps is probably BlackberryOS.

Take Advantage of Other Firebase Services

With our focus on synching Firebase with GA4 and taking advantage of specialized reporting within GA4, we don’t want to lose sight of the mobile app optimization capabilities that are available directly in Firebase but not in Google Analytics.

Testing and Personalization

Firebase provides a range of services for testing, personalization, messaging, and dynamic updating in your mobile app, all of which can take advantage of the audiences that you create in Firebase or GA4. An audience that you create in one is instantly replicated in the other.

Custom Audiences are automatically replicated between a linked Firebase project and GA4 property.
You can use Audiences for messaging, personalization, and testing in Firebase.

You can also take advantage of Firebase Predictions to generate user segments based on machine learning, which you can activate in Firebase services as you would the rules-based audiences referenced above.

Crashlytics

Optimization begins with an error-free user experience.  Enable the Crashlytics service in your Android and iOS mobile apps to stay on top of errors that could degrade the end-user experience in your mobile apps and detract from your business objectives.

Crashlytics is a Firebase service that reports crashes and non-fatal exceptions in your Android and iOS apps.

Best of Both Worlds

If you haven’t taken steps to track your mobile apps, or to share existing Firebase Analytics data with Google Analytics 4, now is the time. With the close integration of Firebase and GA4, a single implementation process provides distinct benefits in both platforms. And if you offer your users a mobile app and website experience, this integration provides a more comprehensive view of your end users’ cross platform experience, and the unified data model itself enables much more cohesive reporting.

You and your teams will still have to do the hard work required for analysis and optimization, but the combined capabilities of Firebase and GA4 should put you in a better position to gain insights, provide a better experience for your mobile app users, and generate incremental value for your organization.

Dual Tagging

Dual tagging/tracking does not refer to tracking mobile and web activity into the same Google Analytics 4 property.

As of early 2021, dual tagging refers primarily to concurrent tracking of website activity into GA Universal and GA4.  If you’ve already been tracking your mobile apps into GA Universal and you’re getting started with Firebase tracking, there’s certainly no downside to tracking your mobile activity with both platforms near-term and taking advantage of historical continuity in GA Universal. But if you’re just getting started with mobile app tracking, or you’re already using Firebase only, there should normally be no reason to establish a separate mobile tracking stream into GA Universal.

Why GA4 Is Good News for Mobile Apps

GA4 provides a number of advantages for mobile app tracking measurement.

Same Implementation for Both Platforms

The same implementation steps can populate mobile app tracking data in a Firebase project and a GA4 property. The only slight difference lies in where you first create your Android and iOS data streams.  Data streams that you create in a GA4 property automatically sync with a new Firebase project, whereas Android and iOS data streams that you create in a Firebase project require a simple integration step to be synched with GA4.

Once you’ve implemented your mobile app tracking and the data streams are synched, you can begin to take advantage of the different capabilities that each platform offers for analysis, optimization, and marketing.

If you’re already tracking into Firebase, initiate your link to GA4 from the Firebase project settings.
When you link from Firebase to sync your Android and/or iOS data streams with GA4, you can create a new GA4 property or select an existing GA property.

GA4 has Adopted the Firebase Analytics Data Model

Android, iOS, and web data streams in Google Analytics 4 directly leverage the flexible, agnostic, event-based data model that forms the foundation of Firebase Analytics.  

As an example, if you were using GA Universal to track internal navigation within your mobile app or your website, you would send the following values (or something similar) in conformance with the predefined event model:

Event Category: main menu
Event Action: click
Event Value: about us

In Firebase and GA4, you could track this action using the event/parameter model:

event_name: main menu
menu_item: about us

The menu_item parameter has a specific intrinsic meaning, even without the context of the event name.  Many Google Analytics Universal practitioners are welcoming the switch to this more agnostic event data model.  If you are already accustomed to working with Firebase Analytics, you’ll be able to leverage the same schema for implementation and reporting in GA4, across web and mobile data streams.

Increased Limits for Custom Dimensions and Custom Metrics

The event parameters that you pass to Firebase Analytics aren’t fully available for reporting in the UI unless you map them to custom dimensions or custom metrics. While this requirement is not in itself especially intuitive, it is important to take full advantage of these custom definitions in your analysis.

Custom definitions allow you to map event parameters as custom dimensions or custom metrics. The limits increase for mobile tracking if you’ve linked your Firebase project to a Google Analytics 4 property.
Custom dimension definition.
With the event parameter mapped to a custom dimension, it becomes available in more reporting contexts.

If you are tracking mobile data into Firebase Analytics without having linked your Firebase project to a Google Analytics 4 property, you can map 10 text-string event parameters as custom dimensions and 40 numeric event parameters as custom metrics.  40 custom metrics will serve most organizations well, while 10 custom dimensions can be very limiting. A typical analytics implementation requires many more custom dimensions that custom metrics, particularly at the enterprise level.

Once you link your Firebase project to a GA4 property, you can define 50 custom dimensions and 50 custom metrics to be populated from event parameters for reporting in the UI.

Custom Definition Type Limit in Firebase Project Not Linked to GA4 Property Limit in Firebase Project Linked to GA4 Property
Custom Dimension 10 50
Custom Metric 40 50

Note that all event parameters (in their full length, even beyond the 100-char parameter limit displayed in the reporting UI) are included in the BigQuery export that you can configure either from Firebase Analytics or Google Analytics 4.

GA4 Offers Richer Reporting for Mobile App Analytics

Once you link your Firebase project to a GA4 property, you have access to a range of reporting templates for your mobile analytics data that aren’t available in the Firebase UI, including:

  • Funnel Analysis
  • Path Analysis
  • Segment Overlap

Chart formats within the GA4 Exploration template include:

  • Line Chart
  • Bar Chart
  • Donut Chart
  • Scatterplot
  • Geo Map
Many additional reporting formats are available for your mobile analytics data in GA4.

Shared Identity Spaces Between Mobile and Web Data Streams

Google Analytics 4 uses three mechanisms for identifying the same users across web, Android, and iOS data streams, thereby providing a better understanding of user behavior across platforms. 

When processing analytics data, GA4 cascades through the following fallback to identify users:

  1. user ID
    • value that you can pass explicitly to GA4 (in an Android, iOS, or web data stream)  when a user authenticates to your back end
  2. Google Signals
    • applies to users who are authenticated to Google when they’re accessing your mobile app or website
    • does not apply to users who have disabled Ads Personalization in their Google account settings
    • you need to enable Google Signals in the GA4 property admin
  3. client ID
    • the app Instance ID for mobile apps and the _ga browser cookie value for websites
    • cannot unify users across mobile and web data streams

Even though GA4 does not join mobile app and website analytics data generated by the same user on the same device by default, it does provide a unified view of users based on user ID or Google Signals. In this way, you’d be able to create a funnel, path analysis, or audience for users who complete a subscription on your website and then consume video in your mobile app.

Based on the user ID that you pass to GA4 for authenticated users and on Google Signals for users logged into Google when accessing your mobile app and website, GA4 can report on individual users across data streams.

Implementation Scenarios

The path that you take in implementing mobile app tracking in Firebase and Google Analytics 4 will depend on your requirements and the extent of existing implementations in either platform.

Your Current Tracking and Requirements Recommended Implementation Path
Mobile Web
You’re already tracking Android and/or iOS activity into Firebase. You don’t need to track a corresponding website. Starting from the Firebase admin, integrate with GA4. Even though you don’t need GA4 for web tracking in this case, you’ll still be able to take advantage of reporting templates and increased limits for custom dimensions and metrics as outlined above.
You’re already tracking Android and/or iOS activity into Firebase. You want to begin tracking web activity in GA4. Starting from the Firebase admin, set up the integration with GA4.Once you’ve created a new GA4 property as part of the integration step, create a web data stream in that GA4 property.Don’t create a new GA4 property from within the GA4 UI; you won’t be able to select your existing Firebase project to sync with.
You want to begin tracking Android and/or IOS activity. You’re already tracking a Web data stream into GA4. Create an Android and/or iOS data stream from within GA4, which will prompt you to create a new, synched Firebase property.
You’re already tracking Android and/or iOS activity into Firebase. You’re already tracking a Web data stream into GA4. Starting from the Firebase admin, set up the integration with GA4.
You’re using the Firebase SDK to generate analytics events in an Android/iOS mobile app and you’re using GTM to populate both Firebase and a Google Analytics Universal mobile view. (any of the web tracking scenarios above) While this setup is no longer recommended for a new mobile analytics implementation, you can maintain this setup in the near term to continue accessing Google Analytics Universal mobile app tracking while also building up your YoY record in Firebase/GA4.
Once mobile analytics support ends in Google Analytics Universal, you will have begun to build up a YoY mobile app analytics record in Firebase
You’re using the Google Analytics Services SDK to record directly to a GA 360 Universal mobile property. (any of the web tracking scenarios above) Since this SDK is no longer supported for free GA Universal properties, it may be a bit precarious to keep depending on it as your only mobile app analytics solution. It’s recommended to install the Firebase SDK in your app to start building up your Firebase/GA4 record. Optionally, you can add GTM to your Firebase install and continue to generate GA Universal mobile app data from GTM in parallel, as long as this capability remains available.

Installing the SDK and Sending Firebase Analytics Data

Refer to the Google documentation for SDK installation, event tracking, and debugging.

Note that event tracking for mobile apps in Firebase/GA4 can be classified as follows:

  • automatically collected events
  • recommended events
    • the Retail/Ecommerce recommended events populate the GA4 ecommerce reports
    • the other recommended events and parameters don’t yet serve a specific purpose in GA4 and are essentially handled as custom events and parameters,  but since they may serve a special reporting purpose in the future, it’s best practice to use recommended events whenever suitable – rather than fully custom events – for the interactions that you need to track
  • custom events
    • you can report as many as 500 events per app instance, so in practical terms, 500 events per Android data stream and 500 events per iOS data stream
    • events beyond the 500 limit that you include in your Firebase data stream still pass through to BigQuery (if you have configured the BigQuery export)

Google Analytics for React Native and Non-Android/iOS Mobile Apps

If you’ve developed your Android or iOS app in React Native, you can install rnfirebase to take advantage of Firebase functionality without using the SDKs directly.

SDKs are not available for non-Android and non-iOS mobile apps, but you have the option to use Measurement Protocol to track to Google Analytics 4 from any networked environment that can make basic HTTP calls.  Now that Windows mobile devices are running the Android OS, the primary use case for Measurement Protocol with mobile apps is probably BlackberryOS.

Take Advantage of Other Firebase Services

With our focus on synching Firebase with GA4 and taking advantage of specialized reporting within GA4, we don’t want to lose sight of the mobile app optimization capabilities that are available directly in Firebase but not in Google Analytics.

Testing and Personalization

Firebase provides a range of services for testing, personalization, messaging, and dynamic updating in your mobile app, all of which can take advantage of the audiences that you create in Firebase or GA4. An audience that you create in one is instantly replicated in the other.

Custom Audiences are automatically replicated between a linked Firebase project and GA4 property.
You can use Audiences for messaging, personalization, and testing in Firebase.

You can also take advantage of Firebase Predictions to generate user segments based on machine learning, which you can activate in Firebase services as you would the rules-based audiences referenced above.

Crashlytics

Optimization begins with an error-free user experience.  Enable the Crashlytics service in your Android and iOS mobile apps to stay on top of errors that could degrade the end-user experience in your mobile apps and detract from your business objectives.

Crashlytics is a Firebase service that reports crashes and non-fatal exceptions in your Android and iOS apps.

Best of Both Worlds

If you haven’t taken steps to track your mobile apps, or to share existing Firebase Analytics data with Google Analytics 4, now is the time. With the close integration of Firebase and GA4, a single implementation process provides distinct benefits in both platforms. And if you offer your users a mobile app and website experience, this integration provides a more comprehensive view of your end users’ cross platform experience, and the unified data model itself enables much more cohesive reporting.

You and your teams will still have to do the hard work required for analysis and optimization, but the combined capabilities of Firebase and GA4 should put you in a better position to gain insights, provide a better experience for your mobile app users, and generate incremental value for your organization.

CP Marketing

Share
Published by
CP Marketing

Recent Posts

Optimizing user experiences with Digital Experience Analytics (DXA) platforms

As consumers become increasingly digitally savvy, and more and more brand touchpoints take place online,…

2 months ago

Enabling Value-Based Bidding with Google Tightlock

Marketers are on a constant journey to optimize the efficiency of paid search advertising. In…

2 months ago

Resolving “Unassigned” Traffic in GA4

Unassigned traffic in Google Analytics 4 (GA4) can be frustrating for data analysts to deal…

3 months ago

This website uses cookies.