GEO_PERFORMANCE_REPORT data loss

509 views
Skip to first unread message

Maxim Mazurov

unread,
Mar 23, 2021, 11:11:38 AM3/23/21
to AdWords API and Google Ads API Forum
Hi, 

I am currently building code to extract cost, clicks and impressions data with city, region and country groupings. I have been using GEO_PERFORMANCE_REPORT from Adwords API, however, I have noticed that I can get the report only for one client account of many. I am aware that there is no data in the API for UAC, however, plenty of the accounts are not UAC.

I am using this query for the request:

adwords.ReportQueryBuilder()
.Select('Date', 'CampaignId', 'CampaignName', 'AdGroupId', 'AdGroupName', 'IsTargetingLocation',
'CountryCriteriaId', 'RegionCriteriaId', 'CityCriteriaId', 'LocationType',
'Impressions', 'Clicks', 'Cost')
.From('GEO_PERFORMANCE_REPORT')
.Where('IsTargetingLocation').In('true', 'false')
.Where('LocationType').EqualTo('LOCATION_OF_PRESENCE')
.During(start_date=format_date(start_date), end_date=format_date(end_date))
.Build()

On the other hand I found this type of the report in the Google Ads API called user_location_view. Here I can find the specification of only country_criterion_id. Where is the region and city ids? 

In the UI it is possible to get the report with country, region and city grouping with selected metrics (eg cost, clicks). Is that possible for all accounts via Google Ads API? Or is there a way to use Adwords API to get the info for all accounts?

Thanks in advance 
Max

Google Ads API Forum Advisor Prod

unread,
Mar 23, 2021, 11:49:03 PM3/23/21
to mazuro...@gmail.com, adwor...@googlegroups.com
Hi Max,

Thank you for reaching out to our API support team.

In both the AdWords and Google Ads API, extracting reports for all accounts would require you to first perform the below features, to retrieve the client accounts under a MCC/manager account : Afterwards, for every client account returned, you should then be able to call a report request. This is because reporting in both APIs are still on a per client account basis.

For the Geo Performance Report equivalent in the Google Ads API, you may refer to the geographic_view instead. I hope this helps.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Dy6R0:ref

Maxim Mazurov

unread,
Mar 24, 2021, 3:50:12 AM3/24/21
to AdWords API and Google Ads API Forum
Hi, 

This feature is already developed in my code. I am iterating through the whole client account id list, however, I cannot get the geo performance report for active accounts!

For example, I can get statistics for those accounts by ad performance report and all of them are visible in Google Ads UI. Are there any limitations of Geo Performance Report in AdWords API which can return empty data for active accounts?

In Google Ads geographic_view is it guaranteed that it is possible to get the same report as in the UI? Which field can be used to get city, region and country grouping? Is that country_criterion_idgeo_target_region and geo_target_city? In Adwords API I got CityCriteriaIdRegionCriteriaId and CountryCriteriaId. Are those identical to each other?

Due to the naming I believe that geo_target_city will be returned in English. Is that possible to get this in other language? In AdWords API it was possible to get it in different languages with the use of LocationCriterionService by setting the locale parameter in the request.

Google Ads API Forum Advisor Prod

unread,
Mar 24, 2021, 9:48:45 PM3/24/21
to mazuro...@gmail.com, adwor...@googlegroups.com
Hi Maxim,

Could you provide the complete report definition in XML or AWQL format, for your Geo Performance Report request that you mentioned are not returning data? Could you also share sample customer IDs that you used that did not return any results? You may send the requested details using the Reply privately to author option.

The geographic_view should return similar values as its equivalent UI view. To access the Geographic (UI) report, navigate to the Locations menu on the left, then click the MORE tab on the top bar, finally click Geographic report.

For the mapping of equivalent fields of the AdWords API and Google Ads API reports, you may refer to this guide. For the Geo Performance Report and geographic_view, you may refer to this section.

As for the results from the reports, I'm afraid that it would not be possible to return them in other languages.
Message has been deleted

Maxim Mazurov

unread,
Mar 30, 2021, 12:01:16 PM3/30/21
to AdWords API and Google Ads API Forum
Hi

With AdWords API it was my mistake, so finally I made it work. However, now I also need to get this report type for UAC campaigns and having some troubles validating data. To get the report I am using user_location_view which should return data grouped by location of the user specified in segments. If I am running the query below

SELECT
    user_location_view.country_criterion_id,
    segments.date,
    segments.geo_target_region,
    segments.geo_target_city,
    metrics.clicks,
    metrics.cost_micros,
    metrics.impressions
FROM user_location_view
WHERE segments.date = '2021-03-25'

I am getting smaller amount of clicks, cost and impressions in comparison to: 

SELECT
    user_location_view.country_criterion_id,
    metrics.clicks,
    metrics.cost_micros,
    metrics.impressions
FROM user_location_view
WHERE segments.date = '2021-03-25'


I guess this is happening because of the segments used in the query (segments.geo_target_city, segments.geo_target_region). If the city is missing for metrics, it is not returning the row, just omits rows with empty columns. Is that possible to control that and add all the data?

 In AdWords API it returned "--" if there is an empty column.
Just to make it clear let me provide an example. In case of Adwords, API GEO PERFORMANCE REPORT returns country_id, region_id and city_id. If city_id is missing (I guess for those clicks which were not matched to particular city), it returns "--". In case of user_location_view I get different data, because if there is no matched city, there is no row with the metrics which were matched on regions, but not cities. I can provide additional account info for which I am requesting data via private messages if needed.

Other than that UI shows a bit different numbers which are bigger, even when I do not use segments.

Google Ads API Forum Advisor Prod

unread,
Mar 31, 2021, 2:48:36 AM3/31/21
to mazuro...@gmail.com, adwor...@googlegroups.com
Hi Maxim,

Thank you for the detailed follow up.

Unfortunately, in the Google Ads API, when adding segment fields in your query, certain records may be automatically omitted if there aren't any metrics or values associated to those segment fields.

As a workaround, you may perform separate requests, one where only the segments.geo_target_region is included, and another where the segments.geo_target_city is specified.

For the discrepancy you are encountering when comparing the Google Ads UI and the API report even when not using segment fields, could you share the following details :
  • customer ID
  • report query with date filter or the more complete request and response logs, with the request-id
  • complete Google Ads UI screenshot showing the account ID and date filters
You may send the requested details using the Reply privately to author option.

Reply all
Reply to author
Forward
0 new messages