'Problem with Google ADS API with Python: why I have not data in the geographic view?
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.
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
