# Setting up Google Admob

As explained in [AdMob Introduction](/apps/ionic-4-full-app/pro-pack-features/admob-integration/admob-introduction.md), 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.

{% hint style="info" %}
These days AdMob is integrated with Firebase, so if your app uses Firebase, remember to create the AdMob account with same account as Firebase
{% endhint %}

## Create Google AdMob account

### Instructions

* Signup then Sign in to your AdMob account at [https://apps.admob.com](https://apps.admob.com/?utm_source=internal\&utm_medium=et\&utm_campaign=helpcentrecontextualopt\&utm_term=http://goo.gl/6Xkfcf\&subid=ww-ww-et-amhelpv4).
* 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.

![](/files/-LbDtyaXrUXDEMN-oQLz)

* Click **Ad units** in the sidebar.
* Click **Get started**. If you've already created ad units for this app, click **Add ad unit**.&#x20;

![](/files/-LbDuDGhj1ujVrYOuXwZ)

* Click **Select** for the Banner [ad format](https://support.google.com/admob/answer/7357858).
* 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.

![](/files/-LbDuH36khJZ-9M3RMBC)

* (optional) Complete the advanced settings for this ad unit:
  * **Ad type**: Choose the [ad type](https://support.google.com/admob/answer/7357858#comparison)(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:*&#x53;elect **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.

    1. Click the **eCPM floor** toggle to turn it on and enable eCPM floors for your ad unit.
    2. 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.
    1. 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.
    2. Click the ![Edit](https://lh3.ggpht.com/-xujKpwhmzZcDSmXNewBe_6-oam__hvkMLO72Ej0PFQUghHxGj7xOtpy4AtLIvjnh3Kn=w18-h18) icon beside the country or region you selected and enter an eCPM floor value.&#x20;
    3. Click **Set** to save the eCPM value.&#x20;
    4. Repeat these steps for each country you select.
* Click **Create ad unit**.

![Created ad units are visible on the app page with IDs](/files/-LbDuKFY4H8CL_pkYpqQ)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://enappd-apps.gitbook.io/apps/ionic-4-full-app/pro-pack-features/admob-integration/setting-up-google-admob.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
