Google Ads API missing fields

98 views
Skip to first unread message

Tomas Courreges

unread,
Jun 6, 2019, 5:35:51 PM6/6/19
to AdWords API and Google Ads API Forum
Hi!

I'm trying to get results of my campaigns by ad level but i'm not managing to get some breakdowns I need.
I was using ad_group_ad but that won't let me use geographical view.

What I'm trying to achieve is: Ad name, Ad Group name, Campaign Name, Country (ISO Code), Device operative system, and then some metrics like conversions and cost.

Another thing is that when using geographical view I get the country_criterion_id, is there any way to match it with the ISO Code within the API?

This is the current query I made:
SELECT
geographic_view.location_type,
segments.date,
campaign.name,
ad_group.name,
metrics.impressions,
metrics.conversions,
metrics.clicks,
metrics.cost_micros
 FROM geographic_view
 WHERE segments.date DURING YESTERDAY

In this last query I'm missing ad level, device operative system, and country iso code.

Thanks!

Google Ads API Forum Advisor Prod

unread,
Jun 7, 2019, 3:55:28 AM6/7/19
to adwor...@googlegroups.com
Hi Tomas,

Not all resources can be retrieved in a single query. In your geographic view query, you would not be able to retrieve ad level information as it is not supported. You can refer to its documentation such as the Metrics, Segments, Attribute Resources, and Selectable With dropdowns as to which fields you can include in your query. The same should also apply to other views wherein the said dropdowns should point to the fields you can select for the view.

As for the ISO code that you mentioned, could you confirm if what you meant is actually the country code? If yes, you will have to retrieve it via the geographic_view.country_geo_target_constant field instead.

Thanks and regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001UBlvr0:ref

Tomas Courreges

unread,
Jun 7, 2019, 3:16:31 PM6/7/19
to AdWords API and Google Ads API Forum
Hi Peter,

Okay i'll make two queries and then join them to get ad level information.


About country code, i'm trying to get ISO-3166-1 alpha-2 country code.

Last question, is there a way to get device operative system?

Thanks!

Google Ads API Forum Advisor Prod

unread,
Jun 10, 2019, 1:23:15 AM6/10/19
to adwor...@googlegroups.com
Hi Tomas,

As seen in the AdWords API's geo targets documentation (codes are also used by the Google Ads API), the Country Code is already currently in the ISO-3166-1 alpha-2 format. In the old reports, it can be retrieved via the CountryCriteriaId field. Now in the new Google Ads API it should be returned through the geographic_view.country_geo_target_constant field. You may also refer to this migration documentation of the old and new reports for further reference.

As for device operating systems, I'm afraid that this is currently not supported in the Google Ads API. For updates, you may continue to follow our blog. I hope this helps.
Reply all
Reply to author
Forward
0 new messages