Setting up Google Admob
Before integrating AdMob in your app, you need to setup Google Admob and create Ad units
Last updated
Before integrating AdMob in your app, you need to setup Google Admob and create Ad units
Last updated
As explained in AdMob Introduction, there are 4 types of Ads. How to select which type of Ad displays in your app is decided by specific functions and Ad Unit Id. To get an Ad Unit Id, you need to create an AdMob account on Google and create Ad units.
These days AdMob is integrated with Firebase, so if your app uses Firebase, remember to create the AdMob account with same account as Firebase
Signup then Sign in to your AdMob account at https://apps.admob.com.
Click Apps in the sidebar.
Select the name of the app you're creating this ad unit for. If you don't see it in the list of recent apps, you can click Add app to add a new app or click View all apps to search a list of all of the apps you've added to AdMob.
Click Ad units in the sidebar.
Click Get started. If you've already created ad units for this app, click Add ad unit.
Click Select for the Banner ad format.
Enter a name for this ad unit. Recommended: Include relevant information, such as ad format and location in your app to make it easier to identify later.
(optional) Complete the advanced settings for this ad unit:
Ad type: Choose the ad type(s) allowed to be shown in this ad unit. You can choose any combination of ad types by checking the boxes. Unchecking all of the boxes will result in an error. You must choose at least one ad type for each ad unit. Suggestion: To try and help maximize revenue for this ad unit, we suggest checking all of the boxes.
Automatic refresh: Determines how often a new ad request is generated for this ad unit. Recommended:Select Google optimized to let AdMob manage the refresh rate for you. The Google-optimized rate is calculated using AdMob historical data to ensure the ads shown in your ad units are being refreshed at the best rate for banner ads. You may also set a custom refresh rate of 30-150 seconds or disable automatic refresh rate completely.
eCPM floor: You can set an eCPM floor (also known as a minimum eCPM) for each ad unit you create. This instructs the AdMob Network not to serve ads to this ad unit with eCPM values below the minimum eCPM you’ve set.
Click the eCPM floor toggle to turn it on and enable eCPM floors for your ad unit.
Enter a global eCPM value for the AdMob Network to use as a floor.
This eCPM floor only applies to the AdMob Network. It does not apply to third-party ad networks and custom events configured as ad sources in a mediation group.
(optional) Country-specific floors: If you've enabled an eCPM floor in the previous step, you can click Add country-specific floors to add country-specific eCPM floors for this ad unit. Country-specific eCPM floors will override this ad unit’s global eCPM value only when ad requests originate from the selected country.
Select a country for which you want to set a specific floor. It will be added to the list of selected countries. You can select whole regions, or expand each section to view the individual countries within a region.
Click Set to save the eCPM value.
Repeat these steps for each country you select.
Click Create ad unit.
Click the icon beside the country or region you selected and enter an eCPM floor value.