Skip to main content

Google AdMob integration plan

Last updated 10/03/2026
tip

Note that data generated by third-party data integration counts toward the cluster's data consumption

Summary​

Interface overview​

InterfaceTypeGranularityAttributionCostRevenueImpressionsClicksConversions
Reporting APIAPIAggregated metrics✅✅✅

The Google AdMob Reporting API returns aggregated monetization ad data, including monetization ad impressions, clicks, and revenue

Integration process​

  1. Log in to your AdMob account and get the Publisher ID
  2. Log in to Google Cloud Platform, create a project with AdMob API access, and generate a Client ID and Client Secret
  3. Log in to the AE backend, go to the Third-party Integration module, add a Google AdMob plan, and complete the related configuration
  4. Go back to the GCP project you created earlier, configure the correct callback URL, and complete the authorization
  5. 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.

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.

  1. 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.
  1. Next, select External for User Type and click CREATE to go to the next step:
  1. Complete the settings marked with * (you can use the email address of your Google account) and click SAVE AND CONTINUE
  1. 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
  1. 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
  1. 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.

  1. On the CREDENTIALS tab, click + CREATE CREDENTIALS and select Help me choose to start creating the Client ID and Client Secret.
  1. On the Credential Type page, select AdMob API and User Data in turn, and click NEXT
  1. Because the scopes were already configured when you created the OAuth consent screen, you can click SAVE AND CONTINUE directly here
  1. 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.
  1. 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
  1. 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:

ModuleNameDescription
sink_eventevent_mappingEvent 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

metricsMetrics in the data; list type. Different report types support different metrics, so pay attention when filling it in
group_byGrouping 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:

MetricNameRemarks
AD_REQUESTSAd requestsIncompatible with the analysis dimension AD_TYPE
CLICKSAd clicks
ESTIMATED_EARNINGSEstimated earningsEstimated total earnings. Note that this value is multiplied by 1000000 (for example, $6.50 is 6500000), so divide it by 1000000 when using it
IMPRESSIONSAd impressionsTotal impressions
IMPRESSION_CTRClick-through rate

IMPRESSION_RPM

Impression RPMEstimated 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_REQUESTSMatched requestsNumber of responses received after ad requests
MATCH_RATEMatch rateEquals matched requests / ad requests. Incompatible with the analysis dimension AD_TYPE
SHOW_RATEShow rateEquals 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:

DimensionDescriptionDescriptionDefault
DATEGroup by dayGroups by time in YYYYMMDD format (such as "20210701"). At least one time dimension is requiredYes
MONTHGroup by monthGroups by time in YYYYMM format (such as "202107"). At least one time dimension is required
WEEKGroup by weekGroups by time in the YYYYMMDD format of the first day of the week (such as "20210701"). At least one time dimension is required
AD_UNITGroup by ad unitTakes the unique ID of the ad unit (such as "ca-app-pub-1234/1234"). Using this dimension automatically adds the APP dimensionYes
APPGroup by appTakes the app ID (such as "ca-app-pub-1234~1234")Yes
AD_TYPEGroup by ad typeValues such as "text" or "image". Note: incompatible with the metrics AD_REQUESTS, MATCH_RATE, and IMPRESSION_RPM
COUNTRYGroup by country (region)Takes the country (region) code in the Unicode CLDR standard, such as "US" and "FR"Yes
FORMATGroup by ad unit typeTakes the ad unit type, such as "banner" and "native"Yes
PLATFORMGroup by platformValues such as "Android" and "iOS"Yes
MOBILE_OS_VERSIONGroup by OS versionValues such as "iOS 13.5.1"Yes
GMA_SDK_VERSIONGroup by GoogleMobileAds SDK versionValues such as "iOS 7.62.0"Yes
APP_VERSION_NAMEGroup by app versionAndroid takes versionName from PackageInfo, and iOS takes the app version name from CFBundleShortVersionStringYes
SERVING_RESTRICTIONGroup by ad serving restriction modeValues 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:

MetricNameDescription and notes
AD_REQUESTSAd requests
CLICKSAd clicks

ESTIMATED_EARNINGS

Estimated earningsTotal 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
IMPRESSIONSAd impressionsTotal impressions
IMPRESSION_CTRClick-through rate
MATCHED_REQUESTSMatched requestsNumber of responses received after ad requests
MATCH_RATEMatch rateEquals matched requests / ad requests
OBSERVED_ECPMEstimated eCPMeCPM 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:

DimensionDescriptionDescriptionDefault
DATEGroup by dayGroups by time in YYYYMMDD format (such as "20210701"). At least one time dimension is required; DATE is used as the time grouping by defaultYes
MONTHGroup by monthGroups by time in YYYYMM format (such as "202107"). At least one time dimension is required
WEEKGroup by weekGroups by time in the YYYYMMDD format of the first day of the week (such as "20210701"). At least one time dimension is required
AD_SOURCEGroup by ad sourceGroups by ad source ID and ad source nameYes
AD_SOURCE_INSTANCEGroup by ad source instanceGroups by ad source instance ID and ad source instance nameYes
AD_UNITGroup by ad unitTakes the unique ID of the ad unit (such as "ca-app-pub-1234/1234"). Using this dimension automatically adds the APP dimensionYes
APPGroup by appTakes the app ID (such as "ca-app-pub-1234~1234")Yes
MEDIATION_GROUPGroup by mediation groupGroups by mediation group ID and mediation group nameYes
COUNTRYGroup by country (region)Takes the country (region) code in the Unicode CLDR standard, such as "US" and "FR"Yes
FORMATGroup by ad unit typeTakes the ad unit type, such as "banner" and "native"Yes
PLATFORMGroup by platformValues such as "Android" and "iOS"Yes
MOBILE_OS_VERSIONGroup by OS versionValues such as "iOS 13.5.1". Note: incompatible with the metrics ESTIMATED_EARNINGS and OBSERVED_ECPM
GMA_SDK_VERSIONGroup by GoogleMobileAds SDK versionValues such as "iOS 7.62.0". Note: incompatible with the metrics ESTIMATED_EARNINGS and OBSERVED_ECPM
APP_VERSION_NAMEGroup by app versionAndroid takes versionName from PackageInfo, and iOS takes the app version name from CFBundleShortVersionString. Note: incompatible with the metrics ESTIMATED_EARNINGS and OBSERVED_ECPM
SERVING_RESTRICTIONGroup by ad serving restriction modeValues 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_code uses ISO 4217 three-letter currency codes, such as JPY and USD. If it is not configured, USD is used by default. An invalid code causes parameter validation to fail.
  • language_code sets the report language. If it is not configured, en-US is used by default. For Japanese, set it to ja-JP. Do not enter the currency code JPY in 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 fieldStandardized fieldDescription
publisher_idte_ads_object.ad_account_idAd account ID
ad_unitte_ads_object.ad_group_idAd group ID
ad_sourcete_ads_object.media_sourceMedia source or monetization channel
appte_ads_object.app_idApp ID
platformte_ads_object.platformPlatform, such as Android or iOS
countryte_ads_object.countryCountry or region code
localization_settings_currency_codete_ads_object.currencyRevenue currency; USD if not configured
impressionste_ads_object.impressionsImpressions
clickste_ads_object.clicksClicks
estimated_earnings (the data is divided by 1000000)te_ads_object.revenueMonetization 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.

Was this page helpful?