Location_view not providing all countries data using API

130 views
Skip to first unread message

Neeraj Sharma

unread,
Aug 4, 2022, 9:00:53 AM8/4/22
to Google Ads API and AdWords API Forum
Hi Team,

I was fetching location_view data using service "GoogleAdsService" and get type "SearchGoogleAdsStreamRequest" but the result of api call is combined data of all countries whereas in ads portal there are multiple countries.

GAQL : SELECT
  segments.date,
  customer.id,
  campaign.id,
  campaign_criterion.criterion_id,
  location_view.resource_name,
  metrics.clicks,
  metrics.impressions,
  metrics.interactions,
  metrics.cost_micros,
  metrics.all_conversions,
  metrics.conversions
FROM location_view
WHERE segments.date >= '2022-07-01' AND segments.date <= '2022-07-01'
    and campaign_criterion.type = 'LOCATION'

Any suggestion how to get the necessary data.

Google Ads API Forum Advisor

unread,
Aug 4, 2022, 1:12:29 PM8/4/22
to adwor...@googlegroups.com
Hi,

Thank you for raising this concern to the Google Ads API Forum.

In order to check this in our end, could you please provide the screenshot of the Google Ads UI without a truncated part? This information will help our team to check this concern. 

For privacy purposes, you can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsapi-support@google.com.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2d4okQ:ref

Neeraj Sharma

unread,
Aug 5, 2022, 8:04:46 AM8/5/22
to Google Ads API and AdWords API Forum
I've send the screenshots to author.

On Thursday, August 4, 2022 at 10:42:29 PM UTC+5:30 adsapi wrote:
Hi,

Thank you for raising this concern to the Google Ads API Forum.

In order to check this in our end, could you please provide the screenshot of the Google Ads UI without a truncated part? This information will help our team to check this concern. 

For privacy purposes, you can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Google Ads API Forum Advisor

unread,
Aug 5, 2022, 1:13:38 PM8/5/22
to adwor...@googlegroups.com

Hi Neeraj,

Thank you for providing the requested information.

Upon checking the provided UI, I can see that the location is filtered as 'matched location'. Upon trying the available resources on my end, I can get the data in the UI using the geographic_view so I would suggest using it instead. Such that the metrics are always segmented by AREA_OF_INTEREST and LOCATION_OF_PRESENCE, however, if you sum these rows for specific geo, you can get the same values as UI.

Let me know what goes after trying the provided suggestion.

Best regards,

Neeraj Sharma

unread,
Aug 8, 2022, 5:53:06 AM8/8/22
to Google Ads API and AdWords API Forum
Hi Team,

I used geographic_view as suggested using below GAQL query:
SELECT segments.date, customer.id, campaign.id, geographic_view.country_criterion_id, campaign.start_date, campaign.end_date, geographic_view.resource_name, customer.currency_code, customer.descriptive_name, campaign.name, campaign.status, segments.geo_target_city, segments.geo_target_metro, segments.geo_target_most_specific_location, segments.geo_target_region, ad_group.id, ad_group.name, ad_group.status, segments.device, geographic_view.location_type, metrics.clicks, metrics.cost_micros, metrics.impressions, metrics.interactions, metrics.all_conversions, metrics.conversions FROM geographic_view WHERE segments.date >= '2022-07-01' AND segments.date <= '2022-07-01' ORDER BY segments.date DESC, campaign.id ASC

But I didn't find any data for specific date and campaign id. I've sent the same query with campaign id filter to author. 
There are many cases where campaigns are present in location_view but missing from geographic_view. Is there anything which I'm missing while using geographic_view?

I'm looking for campaign segmented by country and city. Can you please share the query or logic how to derive this.

Reply all
Reply to author
Forward
0 new messages