Issue with Ad Exchange Historical Report API Using Python

261 views
Skip to first unread message

Raviv Barzilai

unread,
Jan 7, 2020, 10:28:39 AM1/7/20
to Google Ad Manager API Forum
Hi,
I wrote a python script that runs a report query on the ReportService API 
The report type for the query is "Ad Exchange historical"
The report contains these parameters:
dimensions = ['AD_EXCHANGE_DATE', 'AD_EXCHANGE_COUNTRY_NAME', 'AD_EXCHANGE_PRICING_RULE_ID',
'AD_EXCHANGE_DFP_AD_UNIT', 'AD_EXCHANGE_PRICING_RULE_NAME']
columns = ['AD_EXCHANGE_AD_REQUESTS', 'AD_EXCHANGE_IMPRESSIONS', 'AD_EXCHANGE_CLICKS', 'AD_EXCHANGE_AD_ECPM', 'AD_EXCHANGE_ESTIMATED_REVENUE']
statement = {'query': "WHERE NOT AD_EXCHANGE_PRICING_RULE_NAME IN ('(No pricing rule applied)')"}
report_type = 'Ad Exchange historical'

# Create report job.
report_job = {
'reportQuery': {
'dimensions': dimensions,
'columns': columns,
'dateRangeType': 'CUSTOM_DATE',
'startDate': start_date,
'endDate': end_date
}
}

if report_type =='Ad Exchange historical':
report_job['reportQuery'].update({'timeZoneType': 'AD_EXCHANGE'})
report_job['reportQuery'].update({'adxReportCurrency': 'USD'})

When i receive the result the Metrics ['AD_EXCHANGE_AD_REQUESTS', 'AD_EXCHANGE_IMPRESSIONS', 'AD_EXCHANGE_CLICKS'] are exactly the same as in Ad Manager UI
but ['AD_EXCHANGE_AD_ECPM', 'AD_EXCHANGE_ESTIMATED_REVENUE'] shows completly different numbers. 
I was making sure that the adxReportCurrency is in USD and the timeZoneType is the same.

I don't know if i am missing something or is it a known issue?  

Ad Manager API Forum Advisor Prod

unread,
Jan 7, 2020, 2:38:57 PM1/7/20
to ra...@365scores.com, google-doubleclick...@googlegroups.com
Hi Raviv,

In order for me to deeper investigate, can you please provide screenshots of the query you made in the UI? Additionally, can you let me know what date range you have set for CUSTOM_DATE within the API, your network code and the email authenticating the API call so that I can try replicating your reports from my end? 

When providing this information, please ensure that you "Reply privately to author.

Thanks,
Danica, Ad Manager API Team 

ref:_00D1U1174p._5001UOGBzZ:ref
Reply all
Reply to author
Forward
0 new messages