Reputation: 8075
About the AdSense reporting api - GET /accounts/accountId/reports
Does it retrieve AdMob only data (as an ad network) or can it include data from other mediated Ad Networks as well?
Upvotes: 0
Views: 1223
Reputation: 426
There is an AdMob API available to get the AdMob specific data.
It provides a possibility to generate network and mediation reports available. It could be as simple as:
curl -X POST https://admob.googleapis.com/v1/accounts/<your_publisher_id>/mediationReport:generate \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
--data @- << EOF
{
"report_spec": {
"date_range": {
"start_date": {"year": 2020, "month": 4, "day": 1},
"end_date": {"year": 2020, "month": 4, "day": 1}
},
"dimensions": ["AD_SOURCE", "AD_UNIT", "PLATFORM"],
"metrics": ["ESTIMATED_EARNINGS"]
}
}
EOF
Upvotes: 1
Reputation: 11
I know this is old, but it does use AdMob, there are some params here for Ad Sense: https://developers.google.com/adsense/management/metrics-dimensions
Also there is some for AdMob here: https://developers.google.com/admob/android/reporting
You can mix and match and even try your request here to see the output: https://developers.google.com/adsense/management/v1.4/reference/accounts/reports/generate
We use:
My problem is how to send an authorised request for this from a Unity c# app sitting on a PC but that's a problem for another thread...
Upvotes: 0
Reputation: 69
if your ad unit included source from other ad network (i.e. mediated), then the AD_REQUESTS, PAGE_VIEWS fields is the total no. of request you sent. But the field INDIVIDUAL_AD_IMPRESSIONS represents impressions served by admob network, so do the EARNINGS field.
for example, you sent 9000 requests to an ad unit with 3 ad source. Assuming all ad source are made equal, you may see 9000 as AD_REQUESTS, and 3000 as INDIVIDUAL_AD_IMPRESSIONS.
There seems to have no way to use adsense reporting api to get the "AdMob Network requests" or "AdMob Network requests RPM"
Upvotes: 0