(Translated by https://www.hiragana.jp/)
Google Ads Developer Blog: adsense_management_api_v1.3

You may have heard that we launched local time zone reporting for AdSense, a fantastic feature for publishers far from the Pacific Time Zone (PTZ)! On the API side we’ve been asked some questions about it, as in some cases this may lead to the AdSense web interface and the AdSense Management API showing different data.

In Version 1.3 of the AdSense Management API, the report.generate call has a new, optional parameter called useTimezoneReporting. If set to true, the report will be generated in the local time zone configured in the web interface. Note that billing is still based on PTZ, so if you want to fetch actual earnings you may want to make sure that useTimezoneReporting is set to false or you might see small discrepancies.

The default value for this parameter is false resulting in PTZ being respected, as it was before the feature was added. If an AdSense user doesn’t choose a local time zone it will default to PTZ, so this parameter won’t make a difference.

Our recommendation is that developers let users choose if they want reports in their “Billing time zone” or their “Local time zone” (to match AdSense’s terminology).

Bear in mind that users changing their local time zones can generate spikes or dips in the local time zone reports, as it makes the day of the change longer or shorter.

You can read more about this in the AdSense blog, and the AdSense help center has instructions on how to enable the feature.


We have recently published several new resources to help developers build reporting calls to the API:

1. Metrics and dimensions reference pages, with each defined by the relevant values, formats and limits.
2. New metadata calls in the AdSense Management API V1.3 that allow developers to fetch the list of available dimensions and metrics, check compatibility between each other and find out what products are supported. A sample response might be:
{
  "kind": "adsense#reportingMetadataEntry",
  "id": "EXAMPLE_DIMENSION",
  "compatibleDimensions": [
    "1",
    "2",
    "4",
    ...
  ],
  "compatibleMetrics": [
    "AD_REQUESTS",
    "AD_REQUESTS_COVERAGE",
    "AD_REQUESTS_CTR",
    ...
  ],
  "supportedProducts": [
    "AFMC",
    "AFC",
    "AFV"
  ]
},
The compatibleDimensions field shows a list where each item is an integer representing a group of compatible dimensions. As there is no one-to-one relation between compatible dimensions, they are represented as groups (as shown below).

Examples
Group #1 Group #2 Group #3 Group #4
AD_CLIENT_ID
AD_FORMAT_CODE
AD_FORMAT_NAME





BID_TYPE_CODE
BID_TYPE_NAME







DATE
DOMAIN_NAME
MONTH
PLATFORM_TYPE_CODE
PLATFORM_TYPE_NAME
PRODUCT_CODE
PRODUCT_NAME
TARGETING_TYPE_CODE
TARGETING_TYPE_NAME
WEEK
AD_CLIENT_ID
AD_FORMAT_CODE
AD_FORMAT_NAME





BID_TYPE_CODE
BID_TYPE_NAME





BUYER_NETWORK_ID
BUYER_NETWORK_NAME
DATE

MONTH
PLATFORM_TYPE_CODE
PLATFORM_TYPE_NAME
PRODUCT_CODE
PRODUCT_NAME
TARGETING_TYPE_CODE
TARGETING_TYPE_NAME
WEEK
AD_CLIENT_ID
AD_FORMAT_CODE
AD_FORMAT_NAME
AD_UNIT_CODE
AD_UNIT_ID
AD_UNIT_NAME
AD_UNIT_SIZE_CODE
AD_UNIT_SIZE_NAME
BID_TYPE_CODE
BID_TYPE_NAME
COUNTRY_CODE
COUNTRY_NAME





DATE

MONTH
PLATFORM_TYPE_CODE
PLATFORM_TYPE_NAME
PRODUCT_CODE
PRODUCT_NAME
TARGETING_TYPE_CODE
TARGETING_TYPE_NAME
WEEK
AD_CLIENT_ID
AD_FORMAT_CODE
AD_FORMAT_NAME





BID_TYPE_CODE
BID_TYPE_NAME
COUNTRY_CODE
COUNTRY_NAME
CUSTOM_CHANNEL_CODE
CUSTOM_CHANNEL_ID
CUSTOM_CHANNEL_NAME


DATE

MONTH
PLATFORM_TYPE_CODE
PLATFORM_TYPE_NAME
PRODUCT_CODE
PRODUCT_NAME
TARGETING_TYPE_CODE
TARGETING_TYPE_NAME
WEEK

From the previous table, note that:
  • DATE, MONTH and WEEK are compatible with every group. 
  • DOMAIN_NAME (Group #1) is not compatible with CUSTOM_CHANNEL_* (Group #4). 
  • If you want to report on ad units (Group #3) you won’t be able to use custom channels since a custom channel can be applied to one or more ad units. 
  • Country names (Group #3) can be used in combination with ad units (Group #3) or custom channels (Group #4) but ad units cannot be combined with custom channels
Remember to visit the AdSense API forums or our Google+ page if you need any help generating reports!

Version 1.3 of the AdSense Management API is now available and comes with new features to help you retrieve more publisher and reporting information.

Metadata for reporting dimensions and metrics
This is a highly requested feature that provides information on the list of available dimensions and metrics for the publishers, as well as their compatibility. This is useful to help developers avoid generating reports with invalid dimensions and metrics.

Version 1.3 of the AdSense Management API is now available and comes with new features to help you retrieve more publisher and reporting information.

Metadata for reporting dimensions and metrics
This is a highly requested feature that provides information on the list of available dimensions and metrics for the publishers, as well as their compatibility. This is useful to help developers avoid generating reports with invalid dimensions and metrics.

Alerts
You can now list the publisher’s current alerts, in their default language or in the one you specify.

Ad code
You can now programmatically fetch the code of an ad unit using getAdCode.

Remember to visit the AdSense API forums or our Google+ page if you need any help implementing these new features!