Admob with Firebase and getting Ad unit Ids
1. Visit Admob and sign up for a new account using your google account. Once you login to your Admob account, you will be displayed a dashboard as shown below. Click on Monetize button to add a new app to your Admob account.2. Click on Add your app manually and give it a name and select Android platform as shown below. A new App will be created and App-Id will be displayed.
3. Next step is to select an Ad format and customizing it the way you want. Firstly we will start with selecting Banner ad format as shown below. After customizing the Banner ad, you need to click on Save button. Once you click on Save button, a new Ad unit will be created with a unique ad-unit Id. Please make a note of this ad-unit Id corresponding to the Banner ad we created just now.
4. Next step is to link your admob app with the Firebase app you have created in the previous step. Click on Link to Firebase button and enter the package name of your android application. Click on Continue button.
5. Now select Link to an existing Firebase project and existing Firebase app option as shown below.
6. Now you will be shown a message indicating that your Admob app is successfully linked with your Firebase project. Click on Done button.
7. Next step is to create an Interstitial Ad unit and customize it. Click on Create Another Ad Unit button and select Interstitial Ad format.
8. After customizing the Interstitial ad, you need to click on Save button. Once you click on Save button, a new Ad unit will be created with a unique ad-unit Id. Please make a note of this ad-unit Id corresponding to the Interstitial ad we created just now.
9. Next step is to create a Native Ad unit and customize it. Click on Create Another Ad Unit button and select Native Ad format.
10. I have selected the ad size to be Medium and a simple template having install button. After customizing the Native ad, you need to click on Save button.
11. Once you click on Save button, a new Ad unit will be created with a unique ad-unit Id. Please make a note of this ad-unit Id corresponding to the Native ad we created just now.
12. We now have all the 3 Ad unit Ids required for this tutorial. Now if you visit Monetize tab of your Admob dashboard, it will be displayed as shown below.