To get the latest mobile app report features in Google Analytics, use Firebase 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 log custom events and set custom user properties.
Tag Manager for mobile apps is implemented with the Firebase SDK, and requires the creation of a Tag Manager container. Google Analytics 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 automatically log information to Google Analytics. 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.
Add Tag Manager to your Firebase-enabled app when you need to configure additional Google and 3rd party tags.
To implement Tag Manager with your mobile projects:
- Get your app set up with Firebase:
- Install the Firebase SDK (Android | iOS).
- In the Firebase console, add your app to your Firebase project.
- Add Firebase Analytics to your app (Android | iOS).
- Create a Tag Manager account and configure a Tag Manager container.
- Add Tag Manager to your project (Android | iOS).
Use triggers with Event Name and Event Parameter variables to define which events should fire specific tags. Trigger conditions are evaluated whenever an event is logged in the app. Visit the Tag Manager developer documentation for Android and iOS to learn more.
Create the Google Analytics (Firebase) tag
To create a Google Analytics (Firebase) tag:
- Create a Google Analytics for Firebase container for Android or iOS.
- Click Tags New.
- Click Tag Configuration and select Google Analytics (Firebase).
- Use the Actions menu to modify, add, or block events.
- Block Event: 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.
- Add Event: Use this option when you want to measure one 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.
- Modify Event: 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 for the same function.
- 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.
-
Click Triggering and specify an appropriate event trigger that will fire this tag.
-
Save and publish your tag configuration.
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.
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 | ✓ | ✓ |
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.
Related resources
- Tag Manager developer documentation for Android and iOS
- Firebase Help Center