Google AdMob integration plan
Note that data generated by third-party data integration counts toward the cluster's data consumption
Summary
Interface overview
| Interface | Type | Granularity | Attribution | Cost | Revenue | Impressions | Clicks | Conversions |
|---|---|---|---|---|---|---|---|---|
| Reporting API | API | Aggregated metrics | ✅ | ✅ | ✅ |
The Google AdMob Reporting API returns aggregated monetization ad data, including monetization ad impressions, clicks, and revenue
Integration process
- Log in to your AdMob account and get the Publisher ID
- Log in to Google Cloud Platform, create a project with AdMob API access, and generate a Client ID and Client Secret
- Log in to the AE backend, go to the Third-party Integration module, add a Google AdMob plan, and complete the related configuration
- Go back to the GCP project you created earlier, configure the correct callback URL, and complete the authorization
- Check whether the AE system receives the data successfully, and build reports
1. Preparation before integration
1.1 Get the Publisher ID
Log in to the AdMob dashboard and get the Publisher ID by following the path shown below
1.2 Create a project in Google Cloud Platform
Next, you need to create a Google Cloud Platform project. If you have never created a GCP project, log in to Google Cloud Platform and click CREATE PROJECT to create one. If you have already created a project, you can skip this step.
1.3 Enable the AdMob API
Next, you need to enable AdMob API access. In your GCP project, search for AdMob API in the search bar at the top to open its overview page. If the area shown in the image below displays ENABLE, AdMob API access is not enabled for the project. Click ENABLE to enable it.
1.4 Configure the OAuth consent screen
After you enable AdMob API access, you should be redirected to the following page. If you are not, open the menu in the upper left corner, go to APIs & Services > Enabled APIs & services, find AdMob API in the API list, and click it to open the configuration page.
- You can also find AdMob API in the list and click it to open the page shown below. Configure the OAuth consent screen as indicated by the arrows in the image.
- Next, select External for User Type and click CREATE to go to the next step:
- Complete the settings marked with * (you can use the email address of your Google account) and click SAVE AND CONTINUE
- On the Scopes tab, select ADD OR REMOVE SCOPES, select admob.readonly in the AdMob API scopes, click UPDATE to confirm, and click SAVE AND CONTINUE to continue
- Next, on the Test users tab, click ADD USERS to add the email address of the Google account you use to log in to AdMob as a test user. After adding it, click SAVE AND CONTINUE to continue
- The final Summary tab shows what you configured. Confirm it to complete the OAuth consent screen configuration
1.5 Create the Client ID and Client Secret
After configuring the OAuth consent screen, go back to AdMob API to create the Client ID and Client Secret
If you cannot find this page, open the menu in the upper left corner, go to APIs & Services > Enabled APIs & services, find AdMob API in the API list, and click it to open the configuration page.
- On the CREDENTIALS tab, click + CREATE CREDENTIALS and select Help me choose to start creating the Client ID and Client Secret.
- On the Credential Type page, select AdMob API and User Data in turn, and click NEXT
- Because the scopes were already configured when you created the OAuth consent screen, you can click SAVE AND CONTINUE directly here
- Next, select Web application for Application type. You need to configure the callback URL in the area marked with a red box under Authorized redirect URIs. Because you have not yet created a plan in the AE system, enter www.thinkingdata.cn as the authorization URL for now, and change it to the actual callback URL after the plan is created.
- After completing all settings, click CREATE to create the credentials. After they are created, the page shows the Client ID and Client Secret. Keep both of them safe
- Finally, go to OAuth consent screen and click PUBLISH APP under Publishing status to publish the app to production
1.6 Summary
This section describes the work you need to complete on the Google platform before integration. Make sure that you now have the following information:
- The AdMob Publisher ID
- A GCP project with the AdMob API enabled, and the Client ID and Client Secret of that project
2. Plan configuration
After completing the preparation on the Google platform, log in to the AE system and configure the new plan in the Third-party Integration module. The image below shows the Google AdMob configuration page. Follow this section to create the plan
2.1 Authorization information configuration
Click the Configure authorization information button under Authorization Information and enter the information you obtained in the previous step in the pop-up:
2.2 Sync Schedule
In the Sync Schedule module, you can set the policy for the AE system to pull Google AdMob data on a schedule. You can choose to pull data for a period of time at a specific time every day. Because pulled data also counts toward the data volume, avoid pulling data for overly long periods on a schedule
2.3 Receive Settings
You can control whether the data is written as events. If you turn this off, the data is not written to the event table, so do not turn off this setting.
2.4 Configuration
Finally, in the Configuration module, you can control the detailed settings of data pulling, including the time aggregation granularity of the data, the metric fields and dimensions to pull, and the event name after ingestion.
The content of the configuration is a JSON, which you can customize as follows:
| Module | Name | Description |
|---|---|---|
| sink_event | event_mapping | Event name after ingestion; customizable; JSON type. The key corresponds to source.report_types, and the value is the ingestion event name for that report type. |
| source | report_types | Report type to pull. The AdMob Reporting API supports two report types. List type. We recommend that you enter only one element, that is, pull data for only one report at a time Allowed values: network_report, mediation_report. See the following content for details |
| metrics | Metrics in the data; list type. Different report types support different metrics, so pay attention when filling it in | |
| group_by | Grouping dimensions in the data; list type. Different report types support different group_by values, so pay attention when filling it in |
Because data configurations differ greatly between report types, we recommend that you use the configuration template for each level directly, or fine-tune the template
2.4.1 Network Report template
Network Report contains only AdMob monetization ad data. The following is the template for this interface, which you can copy in full into the configuration. To adjust it, refer to this subsection:
{
"sink_event": {
"event_mapping": {
"network_report": "admob_network_report",
"mediation_report": "admob_mediation_report"
}
},
"source": {
"report_types": [
"network_report"
],
"metrics": [
"AD_REQUESTS",
"CLICKS",
"ESTIMATED_EARNINGS",
"IMPRESSIONS",
"IMPRESSION_CTR",
"IMPRESSION_RPM",
"MATCHED_REQUESTS",
"MATCH_RATE",
"SHOW_RATE"
],
"group_by": [
"DATE",
"AD_UNIT",
"APP",
"COUNTRY",
"FORMAT",
"PLATFORM",
"MOBILE_OS_VERSION",
"GMA_SDK_VERSION",
"APP_VERSION_NAME",
"SERVING_RESTRICTION"
]
}
}
- Included metrics
The following metrics are available in the Network Report data of the AdMob API. By default, we store all metrics. To adjust, add the metric names to source.metrics:
| Metric | Name | Remarks |
|---|---|---|
| AD_REQUESTS | Ad requests | Incompatible with the analysis dimension AD_TYPE |
| CLICKS | Ad clicks | |
| ESTIMATED_EARNINGS | Estimated earnings | Estimated total earnings. Note that this value is multiplied by 1000000 (for example, $6.50 is 6500000), so divide it by 1000000 when using it |
| IMPRESSIONS | Ad impressions | Total impressions |
| IMPRESSION_CTR | Click-through rate | |
IMPRESSION_RPM | Impression RPM | Estimated revenue per 1,000 ad impressions, which corresponds to eCPM in the dashboard. Note that this value is multiplied by 1000000 (for example, $1.03 is 1030000), so divide it by 1000000 when using it. Incompatible with the analysis dimension AD_TYPE |
| MATCHED_REQUESTS | Matched requests | Number of responses received after ad requests |
| MATCH_RATE | Match rate | Equals matched requests / ad requests. Incompatible with the analysis dimension AD_TYPE |
| SHOW_RATE | Show rate | Equals ad impressions / matched requests |
- Analysis dimensions
The following are the analysis dimensions of the Network Report data of the AdMob API. To adjust, add the dimension names to source.group_by:
| Dimension | Description | Description | Default |
|---|---|---|---|
| DATE | Group by day | Groups by time in YYYYMMDD format (such as "20210701"). At least one time dimension is required | Yes |
| MONTH | Group by month | Groups by time in YYYYMM format (such as "202107"). At least one time dimension is required | |
| WEEK | Group by week | Groups by time in the YYYYMMDD format of the first day of the week (such as "20210701"). At least one time dimension is required | |
| AD_UNIT | Group by ad unit | Takes the unique ID of the ad unit (such as "ca-app-pub-1234/1234"). Using this dimension automatically adds the APP dimension | Yes |
| APP | Group by app | Takes the app ID (such as "ca-app-pub-1234~1234") | Yes |
| AD_TYPE | Group by ad type | Values such as "text" or "image". Note: incompatible with the metrics AD_REQUESTS, MATCH_RATE, and IMPRESSION_RPM | |
| COUNTRY | Group by country (region) | Takes the country (region) code in the Unicode CLDR standard, such as "US" and "FR" | Yes |
| FORMAT | Group by ad unit type | Takes the ad unit type, such as "banner" and "native" | Yes |
| PLATFORM | Group by platform | Values such as "Android" and "iOS" | Yes |
| MOBILE_OS_VERSION | Group by OS version | Values such as "iOS 13.5.1" | Yes |
| GMA_SDK_VERSION | Group by GoogleMobileAds SDK version | Values such as "iOS 7.62.0" | Yes |
| APP_VERSION_NAME | Group by app version | Android takes versionName from PackageInfo, and iOS takes the app version name from CFBundleShortVersionString | Yes |
| SERVING_RESTRICTION | Group by ad serving restriction mode | Values such as "Non-personalized ads" | Yes |
- Ingestion rules
The template uses the DATE field in the data, that is, the time aggregated by day, padded with zeros, as the #event_time of the record
The event name used in the template is admob_network_report
2.4.2 Mediation Report template
Mediation Report contains AdMob monetization ad data and ad data from other third-party platforms. The following is the template for this interface, which you can copy in full into the configuration. To adjust it, refer to this subsection:
{
"sink_event": {
"event_mapping": {
"network_report": "admob_network_report",
"mediation_report": "admob_mediation_report"
}
},
"source": {
"report_types": [
"mediation_report"
],
"metrics": [
"AD_REQUESTS",
"CLICKS",
"ESTIMATED_EARNINGS",
"IMPRESSIONS",
"IMPRESSION_CTR",
"MATCHED_REQUESTS",
"MATCH_RATE",
"OBSERVED_ECPM"
],
"group_by": [
"DATE",
"AD_SOURCE",
"AD_SOURCE_INSTANCE",
"AD_UNIT",
"APP",
"MEDIATION_GROUP",
"COUNTRY",
"FORMAT",
"PLATFORM"
]
}
}
- Included metrics
The following metrics are available in the Mediation Report data of the AdMob API. By default, we store all metrics. To adjust, add the metric names to source.metrics:
| Metric | Name | Description and notes |
|---|---|---|
| AD_REQUESTS | Ad requests | |
| CLICKS | Ad clicks | |
ESTIMATED_EARNINGS | Estimated earnings | Total earnings estimated by AdMob. Note that this value is multiplied by 1000000 (for example, $6.50 is 6500000), so divide it by 1000000 when using it |
| IMPRESSIONS | Ad impressions | Total impressions |
| IMPRESSION_CTR | Click-through rate | |
| MATCHED_REQUESTS | Matched requests | Number of responses received after ad requests |
| MATCH_RATE | Match rate | Equals matched requests / ad requests |
| OBSERVED_ECPM | Estimated eCPM | eCPM estimated by the third-party platform (because of third-party data permission issues, this value may currently be 0) |
- Analysis dimensions
The following are the analysis dimensions of the Mediation Report data of the AdMob API. To adjust, add the dimension names to source.group_by:
| Dimension | Description | Description | Default |
|---|---|---|---|
| DATE | Group by day | Groups by time in YYYYMMDD format (such as "20210701"). At least one time dimension is required; DATE is used as the time grouping by default | Yes |
| MONTH | Group by month | Groups by time in YYYYMM format (such as "202107"). At least one time dimension is required | |
| WEEK | Group by week | Groups by time in the YYYYMMDD format of the first day of the week (such as "20210701"). At least one time dimension is required | |
| AD_SOURCE | Group by ad source | Groups by ad source ID and ad source name | Yes |
| AD_SOURCE_INSTANCE | Group by ad source instance | Groups by ad source instance ID and ad source instance name | Yes |
| AD_UNIT | Group by ad unit | Takes the unique ID of the ad unit (such as "ca-app-pub-1234/1234"). Using this dimension automatically adds the APP dimension | Yes |
| APP | Group by app | Takes the app ID (such as "ca-app-pub-1234~1234") | Yes |
| MEDIATION_GROUP | Group by mediation group | Groups by mediation group ID and mediation group name | Yes |
| COUNTRY | Group by country (region) | Takes the country (region) code in the Unicode CLDR standard, such as "US" and "FR" | Yes |
| FORMAT | Group by ad unit type | Takes the ad unit type, such as "banner" and "native" | Yes |
| PLATFORM | Group by platform | Values such as "Android" and "iOS" | Yes |
| MOBILE_OS_VERSION | Group by OS version | Values such as "iOS 13.5.1". Note: incompatible with the metrics ESTIMATED_EARNINGS and OBSERVED_ECPM | |
| GMA_SDK_VERSION | Group by GoogleMobileAds SDK version | Values such as "iOS 7.62.0". Note: incompatible with the metrics ESTIMATED_EARNINGS and OBSERVED_ECPM | |
| APP_VERSION_NAME | Group by app version | Android takes versionName from PackageInfo, and iOS takes the app version name from CFBundleShortVersionString. Note: incompatible with the metrics ESTIMATED_EARNINGS and OBSERVED_ECPM | |
| SERVING_RESTRICTION | Group by ad serving restriction mode | Values such as "Non-personalized ads". Note: incompatible with the metric ESTIMATED_EARNINGS |
- Ingestion rules
The template uses the DATE field in the data, that is, the time aggregated by day, padded with zeros, as the #event_time of the record
The event name used in the template is admob_mediation_report
2.4.3 Filter by App ID
To pull data only for specific apps, filter by App ID in extra_params.dimension_filters of the configuration. This setting uses the APP dimension. Replace the App ID in the example with the actual value:
{
"extra_params": {
"dimension_filters": [
{
"dimension": "APP",
"matches_any": {
"values": [
"ca-app-pub-XXXXXXXXXXXXXXXX~XXXXXXXXXX"
]
}
}
]
}
}
2.4.4 Revenue currency configuration
To get AdMob revenue metrics in a specific currency, set currency_code in extra_params.localization_settings of the configuration. This setting applies to both Network Report and Mediation Report:
{
"extra_params": {
"localization_settings": {
"currency_code": "JPY",
"language_code": "en-US"
}
}
}
currency_codeuses ISO 4217 three-letter currency codes, such asJPYandUSD. If it is not configured,USDis used by default. An invalid code causes parameter validation to fail.language_codesets the report language. If it is not configured,en-USis used by default. For Japanese, set it toja-JP. Do not enter the currency codeJPYin this field.- After the configuration takes effect, the revenue currency of subsequently pulled data matches the standardized field
te_ads_object.currency. Historical data that is already stored is not rewritten.
2.5 Standardized fields
If the following event properties exist in the data, we standardize them automatically:
| Original field | Standardized field | Description |
|---|---|---|
| publisher_id | te_ads_object.ad_account_id | Ad account ID |
| ad_unit | te_ads_object.ad_group_id | Ad group ID |
| ad_source | te_ads_object.media_source | Media source or monetization channel |
| app | te_ads_object.app_id | App ID |
| platform | te_ads_object.platform | Platform, such as Android or iOS |
| country | te_ads_object.country | Country or region code |
| localization_settings_currency_code | te_ads_object.currency | Revenue currency; USD if not configured |
| impressions | te_ads_object.impressions | Impressions |
| clicks | te_ads_object.clicks | Clicks |
| estimated_earnings (the data is divided by 1000000) | te_ads_object.revenue | Monetization revenue |
2.6 Complete authorization
After completing the configuration, click Save and authorize in the upper right corner to save the plan configuration. Next, you need to complete the final authorization:
First, in the Authorization Information page that pops up, copy the URL in the first step
Then, go back to Google Cloud Platform and edit the credentials you created earlier (you can find the OAuth 2.0 Client ID you created under APIs & Services > Credentials in the sidebar, and click the edit button next to it to open the edit page). Add the callback URL you just copied under Authorized redirect URIs and click Save to save the change.
Finally, go back to the AE interface and click Go to authorization. The Google AdMob authorization page opens
Log in with the Google account you use for AdMob and follow Google's instructions to complete the authorization
After completing the authorization, in Authorization Information, click I have completed the above two steps in the lower left corner, and then click Complete Authorization in the lower right corner to finish the configuration. You have now completed the Google AdMob data integration.

