Chartramp - Open source project for Google Ads API

64 views
Skip to first unread message

Majid Khosravi

unread,
Nov 14, 2018, 1:05:42 PM11/14/18
to AdWords API and Google Ads API Forum
I have recently started an open source project called Chartramp which pulls data from different ad networks including Google Adwords API for analysis purposes, In case might be useful:


Currently I have an issue regarding fetching the country code from LocationCriterionService to map daily GEO records per country.

Here is the code:


Can you guys have a look and let me know if there is a way to get the countryCode from LocationCriterionService? It always returns as null.

Thanks!

Dannison Yao (AdWords API Team)

unread,
Nov 14, 2018, 3:10:40 PM11/14/18
to AdWords API and Google Ads API Forum
Hi Majid,

It is expected that the value for countryCode will be blank when you retrieve it as this field is generally used for filters. According to the documentation, it is used as a hint or suggestion when you are doing your filtering. For example, you specified CountryCode EQUALS 'US' when calling the API. This means that the results returned by the API is filtered by the countryCode, specifically if it is equal to 'US'.

Hope this helps.

Regards,
Dannison
AdWords API Team

Majid Khosravi

unread,
Nov 14, 2018, 3:48:42 PM11/14/18
to AdWords API and Google Ads API Forum
Thanks Dannison,

So what would be the best way to get the country codes? In the above example I am using CAMPAIGN_LOCATION_TARGET_REPORT service to pull the result per location and I want to get the country code of each location id as well.

Thanks.

Dannison Yao (AdWords API Team)

unread,
Nov 14, 2018, 7:01:39 PM11/14/18
to AdWords API and Google Ads API Forum
Hi Majid,

What you can do here is upon retrieving the Id of the Location from CAMPAIGN_LOCATION_TARGET_REPORT, you can map the location ID to the country code using this guide.

Regards,
Dannison
AdWords API Team

Majid Khosravi

unread,
Nov 14, 2018, 7:07:36 PM11/14/18
to AdWords API and Google Ads API Forum
Thanks but it seems that fusion table is private and I don't have access to it.

Dannison Yao (AdWords API Team)

unread,
Nov 15, 2018, 12:17:37 PM11/15/18
to AdWords API and Google Ads API Forum
Hi Majid,

The link I sent should be publicly available. Could you send over a screenshot of what you're seeing upon accessing it?

Regards,
Dannison
AdWords API Team

Majid Khosravi

unread,
Nov 16, 2018, 6:30:24 AM11/16/18
to AdWords API and Google Ads API Forum
Sure. here it is.
Screenshot 2018-11-16 at 11.29.23.png

Dannison Yao (AdWords API Team)

unread,
Nov 16, 2018, 2:00:00 PM11/16/18
to AdWords API and Google Ads API Forum
Hi Majid,

Could you access this link and click on the "Open Table" button and see if you have access to it?

Regards,
Dannison
AdWords API Team

Majid Khosravi

unread,
Nov 19, 2018, 10:09:08 AM11/19/18
to AdWords API and Google Ads API Forum
I had to logout from my gmail account to be able to download it, thank you.
Reply all
Reply to author
Forward
0 new messages