Google Analytics for mobile apps

Use Tag Manager with Google Analytics and the Firebase SDK.

To get the latest mobile app report features in Google Analytics, use the Firebase SDK in your Android and iOS apps. Once enabled in your app, Google Analytics will automatically collect and report on built-in events and user properties. You can also manually log events and set user properties.

Tag Manager for mobile apps is implemented with the Firebase SDK, and requires a Tag Manager container. Google Analytics for Firebase events, parameters, and user properties are all available as configuration inputs from within Tag Manager.

Use Tag Manager, Firebase, and Google Analytics together

Apps that use Firebase will automatically log information to Google Analytics. Tag manager also gives you the ability to deploy and modify additional Google and 3rd party tags in your apps, without having to rebuild your app.

Use triggers with Event Name and Event Parameter variables to define which events should fire your tags. Trigger conditions are evaluated whenever an event is logged in the app.

To implement Tag Manager with your mobile projects:

  1. Get your app set up with Firebase:
  2. Create a Tag Manager account and configure a Tag Manager container.
  3. Add Tag Manager to your project (Android | iOS).

The Google Analytics for Firebase service in the Firebase SDK collects app usage data for you automatically. Reports will appear in Google Analytics as well as in the Firebase console. As long as you already use the Firebase SDK, you won't need to add any additional code to enable automatically collected events.

Note: Automatically collected events generated by the Firebase SDK and collected by Google Analytics cannot be modified.

Visit the Tag Manager developer documentation for Android and iOS to learn more.

Modify and block events

Tag Manager gives you the ability to modify, add, or block custom events (even after the app has shipped) with the Google Analytics (Firebase) tag. By default, events logged in your app with the Firebase SDK will be sent to Google Analytics, even if Tag Manager is in use. This can be useful in cases where event names  change between app builds and you want to collect consistent data from users that still have older versions of your app.

IMPORTANT: Use the Google Analytics (Firebase) tag from Tag Manager only if you wish to modify, add, or block custom events that are logged by Firebase. Automatically collected events cannot be modified.

Create the Google Analytics (Firebase) tag

To create a Google Analytics (Firebase) tag:

  1. Create a Google Analytics for Firebase container for Android or iOS.
  2. Click Tags and then New.
  3. Click Tag Configuration and select Google Analytics (Firebase).
  4. Configure and save your tag.

Tag configuration

Use the Actions menu to modify, add, or block events.

  • Modify: Use this option to keep parameter names consistent between different versions of your apps. For instance, your Android implementation might have an event called save_image, and your iOS implementation uses save_new_image.
    • Edit parameter names in the Override Event Name field.
    • Use Parameters to Add/Edit to add key names and values. Click the Add Row button and enter the appropriate key names and values.
    • Use Parameters to Drop to drop key names when the tag is fired.
  • Add: Use this option when you want to measure another event at the same time as another event.
    • Edit parameter names in the Override Event Name field.
    • Use Parameters to Add/Edit to add key names and values. Click the Add Row button and enter the appropriate key names and values.
    • Use Parameters to Drop to drop key names when the tag is fired.
  • Block: Use this option to block a manually logged event. For instance, use this if a developer accidentally logged duplicate events, logged an event for something that shouldn't be logged, or logged too many unique event names. Blocked event data is not sent to Firebase Analytics.

Specify the events that you'd like to take action on in the Triggering section.

Automatically collected events available in Tag Manager for Android and iOS

This table lists Google Analytics for Firebase's automatically collected events for Android and iOS that are accessible from Tag Manager:

Event Android iOS
app_exception  
app_update  
firebase_campaign
first_open  
in_app_purchase  
notification_dismiss  
notification_foreground
notification_open
notification_receive  
os_update
session_start
user_engagement

Enable Universal Analytics in Firebase projects with Tag Manager

With Firebase, you can activate a Tag Manager container for your app and then easily use Tag Manager to configure and deploy a Universal Analytics tag or any supported 3rd party tags.

To set up a Universal Analytics tag via Tag Manager:

  1. Get your app set up with Firebase:
    1. Install the Firebase SDK (Android | iOS).
    2. In the Firebase console, add your app to your Firebase project.
    3. Add Firebase Analytics to your app (Android | iOS).
  2. Create a Tag Manager account and configure a Tag Manager container.
  3. Add Tag Manager to your project (Android | iOS).
  4. Create your Google Analytics tag in Tag Manager.

Once your app has been compiled with Firebase and Tag Manager, you can add any additional tags from the Tag Manager interface with no need to rebuild your app.

Related resources

Was this article helpful?
How can we improve it?