Extractor for downloading reports from Google Ad Manager API. It executes a ReportJob and retrieves performance and statistics about ad campaigns, networks, inventory and sales. It uses ReportService.ReportQuery
endpoint.
date_from
anddate_to
(REQUIRED) - Period which the reporting information is gathered, e.g.4 days ago
,yeserday
,August 14, 2020 EST
(it uses dateparser)network_code
(REQUIRED) - You'll find this in the URL when you are logged into your network. For example, in the URLhttps://admanager.google.com/1234#home
,1234
is your network code.timezone
(REQUIRED) - Determines the time zone used for the report's date range. It allowsAD_EXCHANGE
,PUBLISHER
andPROPOSAL_LOCAL
#private_key
(REQUIRED) - Credentials - private key in plain text (will be encrypted by Keboola). Key must be written in one row, each new line must be delimited by\n
character#client_email
andtoken_uri
(REQUIRED) - Credentialsdimensions
(OPTIONAL) - The list of break-down types being requested in the report. It defaults toAD_EXCHANGE_DFP_AD_UNIT
,AD_EXCHANGE_PRICING_RULE_NAME
andDATE
(orAD_EXCHANGE_DATE
if timezone isAD_EXCHANGE
)dimension_attributes
(OPTIONAL) - The list of dimension attributes. Please note, that some dimension attributes can be used only with certain dimension. For more information please see the official documentation.dimension_attributes
are not used by defaultmetrics
(OPTIONAL) - The list of trafficking statistics and revenue information being requested in the report. It defaults toAD_EXCHANGE_AD_REQUESTS
,AD_EXCHANGE_MATCHED_REQUESTS
,AD_EXCHANGE_ESTIMATED_REVENUE
andAD_EXCHANGE_IMPRESSIONS
currency
(OPTIONAL) - The currency for Ad Exchange revenue metrics. It defaults to `CZKad_unit_view
(OPTIONAL) - The adUnitView used for report
{
"date_from": "80 days ago",
"date_to": "yesterday",
"network_code": "68713940014",
"timezone": "AD_EXCHANGE",
"#private_key": "KBC::ProjectSecure::eJwB1Qcq...OVNcF",
"#client_email": "KBC::ProjectSecure::eJwBYQGeE...iKz=",
"token_uri": "https://oauth2.googleapis.com/token",
"dimensions": [
"AD_EXCHANGE_DATE",
"AD_EXCHANGE_DFP_AD_UNIT",
"AD_EXCHANGE_DFP_AD_UNIT_ID",
"AD_EXCHANGE_PRICING_RULE_NAME"
],
"metrics": [
"AD_EXCHANGE_AD_REQUESTS",
"AD_EXCHANGE_MATCHED_REQUESTS",
"AD_EXCHANGE_ESTIMATED_REVENUE",
"AD_EXCHANGE_IMPRESSIONS"
]
}
Please note, that you must replace #private_key
and #client_email
with your real credentials.
- Create a new service account and download JSON file with credentials
- Enable API in General settings of Google Ad Manager client
More details: https://developers.google.com/ad-manager/api/start
- Set your own config file
config/config.json
(use template inconfig/config.template.json
) - Install Docker and Docker Compose and run it by
docker-compose up
- Output CSV file is in
output
directory
In case of any problems with the extractor or additional requests, contact us on development@performax.cz