Complete the following steps to create an ad unit for an existing app.
- Sign in to your AdMob account at https://apps.admob.com.
- Click the Monetize tab.
- Select your application from the All apps list on the left-hand side.
- Click + New ad unit.
- Click Banner, Interstitial, or Rewarded interstitial.
- Provide the following details for the ad unit:
- Ad type: Choose the ad type(s) allowed for this ad unit. You can choose any combination of text and image by checking the boxes. Checking both boxes is recommended since unchecking either of the boxes might limit the revenue generated by the ad unit. Unchecking all of the boxes will result in an error. You must choose at least one ad type for each ad unit.
- Automatic refresh Determine how often a new ad impression is generated. You can choose not to refresh or to refresh ads every 30 to 120 seconds. We recommend setting a refresh rate between 45 and 60 seconds.
- Text ad style: Select a text ad style that complements your app. You can use the standard style or customize your own style.
- Ad unit name: Enter a unique name and description that will help you find this ad unit later (e.g., Top Banner on Home).
- Click Save. You'll see the ad unit ID for this ad unit.
Go to your control panel, go to your app, go to the advertising tab and click on the "How to retrieve an admob id".
Follow the instructions, enter the id and generate your app.