You can run reports for your new AdMob account using the AdSense Management API.
Warning: Legacy AdMob reporting data is not available via the AdSense Management API.
Concepts
Here are some important concepts as they apply to AdMob:
- Account:
An AdSense account has an ID of the format
pub-xxxxxxxxxxxxxxxx
. When you log in to AdMob, this "Publisher ID" is shown at the top-right corner of the page. You need this ID to access most endpoints in the AdSense Management API reference.- Ad Client:
An ad client specifies a relationship between an account and a product.
Your new AdMob account comes with an ad client ID in the format
ca-app-pub-xxxxxxxxxxxxxxxx
(you can retrieve your ad clients using the Accounts.adclients.list call in the AdSense Management API). Use this ad client ID for all your AdMob reporting needs.- Ad Unit:
An ad unit specifies an individual placeholder for ads.
You can find your ad unit ID by going to Monetize -> All apps -> [app in question] in your AdMob page. Look for the ad unit you want to report on and find the ad unit ID in
ca-app-pub-xxxxxxxxxxxxxxxx/nnnnnnnnnn
format. Change it toca-app-pub-xxxxxxxxxxxxxxxx:nnnnnnnnnn
to use in the AdSense Management API.You can also retrieve your ad units by using the Accounts.adunits.list call in the API.
There are plenty of samples you can check out in the AdSense Management API documentation.
Dimensions
The following dimensions are specific to AdMob:
Dimension | Description |
---|---|
APP_ID |
The app store ID or bundle ID of an application. Prefixed with
1: for iOS and 2: for Android. Examples:
1:476954712, 2:com.labpixies.lineup.
|
APP_NAME | The name of the app. This field is truncated to 80 characters and won't be updated even if the app name changes in the App Store or Google Play store. Examples: Flood-It!, Line Up. |
APP_PLATFORM | The app platform. Examples: iOS, Android. |
You can also find other dimensions and metrics (not all of which are necessarily relevant for AdMob) in the AdSense Management API documentation.
Tips
If you want to see only your AdMob earnings, make sure you set a filter with your AdMob account ID. For example:
filter: "AD_CLIENT_ID==ca-app-pub-xxxxxxxxxxxxxxxx"
Similarly, if you want to see your earnings for a single app, you can set a filter with your app ID. For example:
filter: "APP_ID==2:com.labpixies.lineup"