Link your AdMob app(s) to Firebase so that you can use your linked Google Analytics account data in AdMob and have your AdMob ad-revenue data available in Analytics for improved monetization reporting.
To use your Google Analytics for Firebase data in AdMob, your Firebase project must be linked to your Google Analytics account.
Tip: Learn more about the benefits of using Firebase and Google Analytics.
How to link Firebase to your AdMob account
By linking AdMob to Firebase, your Google Analytics data will be available to AdMob independent of your Google Analytics Data Sharing Settings. This allows your Analytics data to flow to AdMob to enhance product features and improve app monetization.
Complete the steps below to link your apps to Firebase.
- Sign in to your AdMob account at https://admob.google.com.
- Click Settings in the sidebar.
- Click the Linked services tab.
- Click in the row of the app you want to link to Firebase.
- Click the toggle to turn on Firebase linking.
- Select a linking option:
Link to an existing Firebase app and project
Use this option if you have an existing Firebase app that you want to link to your AdMob app.- Then, click Link app.
Create a new app in an existing Firebase project
Use this option if you already have a Firebase project but don't have a Firebase app that you want to link to your AdMob app. Firebase will automatically create a Firebase app that's modeled after your AdMob app.Note: Adding a new app to an existing Firebase project will remove any historical user metrics data for the app. We recommend keeping all versions of an app (iOS and Android) in a single Firebase project. If you want to keep the app's historical data, however, consider creating a new project instead. Learn more about the best practices for using Firebase.- Then, click Create app and link.
Create a new Firebase app and project
Use this option if you need both a Firebase project and a Firebase app. After you create a new Firebase project, Firebase will automatically create a Firebase app that's modeled after your AdMob app.- Click Go to Firebase.
Visit the Firebase documentation to learn how to take advantage of more features available through Google Analytics and Firebase, like logging custom events in your app, custom conversions, and growing your app with other Firebase products.
Permission required for linking
To link an AdMob app to Firebase, you must have the following permissions for AdMob, Firebase, and Google Analytics:
- In AdMob, you must have administrator permissions to link an app to Firebase.
-
In Firebase, you must have the '
firebase.links.create'
IAM permission. This permission is included in the Owner role and the Firebase Admin role. If you don't have either of these roles, you can ask a project owner to assign one of these roles to your account via the Firebase console IAM settings. - In Google Analytics, you must have the Edit role or Manage Users role for the property associated with the Firebase project. Learn more about access and data-restriction management.
Troubleshoot
If you’ve received an error while trying to link your AdMob app to Firebase, review the most common causes of linking errors.