Problem with Google ADS API with Python: why I have not data in the geographic view?

49 views
Skip to first unread message

Andrea Pio D'Antonio

unread,
Feb 7, 2022, 8:40:11 AM2/7/22
to Google Ads API and AdWords API Forum
I'm trying to create a geographic report that shows the cost from my google ads camapign split by province. I'm using google ADS API for python.

The GAQL query that I use to extract data is :

query = """SELECT segments.year, segments.week, campaign.name, segments.geo_target_city, segments.geo_target_province, metrics.cost_micros FROM geographic_view WHERE segments.week = '{start_date}' """.format(start_date=start_date)

If I use a certain customer ID of my MCC account and in particular the account ID that contains all the italy campaigns I have results, but if I use another account ID I didn't obtain any data.

Please find here the accounts (censored). In green the one that works and in red the one that doesn't work

The weird thing is that if I switch table in the from and I use "campaign" instead of "geographic_view" I have the data. Unfortunately in "campaign" I ahve not the province and city information that I need.

query1 = """SELECT segments.year, segments.week, campaign.name, segments.geo_target_city, metrics.cost_micros FROM campaign WHERE segments.week = '{start_date}' """.format(start_date=start_date)

Should I change any setting in google ADS? Anyone understand why I have this issue? Thank you.

Google Ads API Forum Advisor

unread,
Feb 7, 2022, 9:05:05 PM2/7/22
to andreapio...@everli.com, adwor...@googlegroups.com

Hello Andrea,

Thank you for reaching out to us.

It seems that you already have created a separate thread on our support channel with this subject (Urgent problem with Google ADS API with Python: why I have not data in the geographic view?). I have already responded to that thread.

Let's utilize that thread instead for better tracking of your concern.

Regards,

Google Logo
Mark Kevin Albios
Google Ads API Team
 


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