Tek Eye Logo

Tek Eye

AdMob App Id and Ad Id for Android Monetization

While there are many providers of app monetization services, Google, the maker of Android, provides its own ad service, called AdMob. To use Google AdMob you will need a Publisher Id, which is created when you create your Admob account. Each app using AdMob will also require its unique AdMob app id, created when the app is registered with AdMob. Finally each ad slot in the app will require an ad unit id, which is created when an ad unit is defined for an app. Once these ids are defined the Google ads library can be added to the app project.

Create AdMob Account

What is AdMob in Android?

When a device is running your ad enabled app you get a very small payment for each ad that is selected (clicked or pressed on), and a small payment for so many thousands of ad impressions (displayed ads). In order for Google to make that payment it must identify in which app the ad was placed. This is done by placing unique AdMob ids in the code that is showing the ads. To get the unique ids for each app and ad you need an AdMob account. Head over to Admob and sign up, you will need a Google account to register.

Once the AdMob account is created the Publisher Id can be found under Account Information from the Settings icon.

Publisher Id in AdMob

Add an App to Admob

In your AdMob account use the Apps icon to add you app. Click the icon and then select ADD APP.

Add an App in AdMob

Enter the App Details

Fill out the app name.

Add App Details in AdMob

The App ID is then available to add to the app code and can be copied using the clipboard icon. It can also be retrieved from the apps list later if required.

App Created in AdMob

If ready to create an ad unit use the Create Ad Unit button.

Create AdMob Ad Unit

Choose the ad type.

Created App Ad Unit

The ad unit is named for easy of reference in the performance reports.

Name AdMob Ad Unit

The ad unit id is available for use in the app code. If it is not copied after the ad unit is created, then it can be copied from the Ad Units option under the app details later. Links are provided for help on adding the AdMob code to the app.

Name AdMob Ad Unit

Accessing App Id and Ad Unit Id

Under the Apps list the clipboard icon can be used to copy the AdMob app id for a particular app.

AdMob App Id

Likewise the ad unit id can be copied under the ad units section for the registered app.

AdMob App Ad Unit Id

Using Test Ads

Prior to final app release the test ad ids should be used when testing code. If real ads are used during the testing phase Google may block the app from displaying ads due to excessive ad requests. See the Google Test Ads article for more information.

AdMob Test Ads

If you need to test the AdMob code without registering a new app with AdMob then use the test App Id listed on the Mobile Ads SDK Get Started page (at the time this tutorial was written the test app id was ca-app-pub-3940256099942544~3347511713).

See Also

Author:  Published:  

ShareSubmit to TwitterSubmit to FacebookSubmit to Google+Submit to LinkedInSubmit to redditPrint Page

markdown CMS Small Logo Icon ↓markdown↓ CMS is fast and simple. Build websites quickly and publish easily. For beginner to expert.



Articles on:

Android Programming and Android Practice Projects, HTML, VPS, Computing, IT, Computer History, ↓markdown↓ CMS, C# Programming, Using Windows for Programming



Free Android Projects and Samples:

Android Examples, Android List Examples, Android UI Examples