[GOOGLE ADS API] Get metrics data by location

426 views
Skip to first unread message

Miguel Graciá

unread,
Apr 30, 2019, 3:13:55 PM4/30/19
to AdWords API and Google Ads API Forum
Hi Team!

I'm trying to replicate the data shown in the screenshot that I attached but I do not match the data that the api returns. Can you please tell me if the following query is correct?

SELECT
campaign
.id,
campaign
.name,
metrics
.impressions,
metrics
.clicks,
metrics
.cost_micros,
metrics
.conversions,
segments
.geo_target_city
FROM campaign
WHERE segments
.date DURING YESTERDAY AND campaign.id=XXXXXXXX

On the other hand. Is there a way to return the name of the location in that same query?

Thank you very much for your help
location_screenshot.png

Miguel Graciá

unread,
May 8, 2019, 5:02:42 AM5/8/19
to AdWords API and Google Ads API Forum
Hi again Team!

I've already seen that I have to use the "location_view" entity to get the data I needed. Now
 the problem is that I'm trying to collect the "proximity" information but the query does not return the data. 
This is the query. 

SELECT campaign.id,campaign.name,campaign_criterion.placement.url,campaign_criterion.proximity.address.city_name,campaign_criterion.proximity.address.country_code,campaign_criterion.proximity.address.postal_code,campaign_criterion.proximity.address.province_code,campaign_criterion.proximity.address.province_name,campaign_criterion.proximity.address.street_address,campaign_criterion.proximity.geo_point.latitude_in_micro_degrees,campaign_criterion.proximity.geo_point.longitude_in_micro_degrees,campaign_criterion.proximity.radius,campaign_criterion.proximity.radius_units,campaign_criterion.resource_name,metrics.cost_micros,metrics.impressions,metrics.conversions FROM location_view WHERE segments.date DURING YESTERDAY AND campaign.id=xxxxx


Is there a related issue?

Thanks for your help.

googleadsapi...@google.com

unread,
May 8, 2019, 6:13:33 AM5/8/19
to AdWords API and Google Ads API Forum
Hi,

Thank you for reaching out. To further investigate this, could you provide the clientCustomerId and campaignId that you used when running this query? Please use the reply privately to author option.

Regards,
Dave
Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/44e25d96-6802-48a9-ac54-088c1eabb88e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages