Campaign stats segmented by location is so confusing

265 views
Skip to first unread message

Iván López

unread,
Oct 13, 2023, 6:03:39 AM10/13/23
to Google Ads API and AdWords API Forum
Hello,

I am trying to get campaign stats segmented by location. In some many cases I can do it but I have encountered some strange behaviors in the API about this.

First of all, I noticed that while in the user_location_view the  available geo segments are:

geo_target_airport
geo_target_canton
geo_target_city
geo_target_county
geo_target_district
geo_target_metro
geo_target_most_specific_location
geo_target_postal_code
geo_target_province
geo_target_region
geo_target_state

In geo_target_constant the possibilities target types are (from last update in documentaiton:

City
Municipality
Neighborhood
District
County
Region
City Region
Borough
Province
University
Airport
State
Country
Department
Territory
Canton
Autonomous Community
Union Territory
Prefecture
Governorate
Postal Code
TV Region
Okrug
National Park
Congressional DistrictCity
Municipality
Neighborhood
District
County
Region
City Region
Borough
Province
University
Airport
State
Country
Department
Territory
Canton
Autonomous Community
Union Territory
Prefecture
Governorate
Postal Code
TV Region
Okrug
National Park
Congressional District

So we have so much different number of geo_target_constant type possibilities (depending on the country) than segments in user_location_view. I could undsertand it if it were any documentation about how to get different level of campaign stats based geo_target_constants and user_location_view possibilities depending on the country. But I cannot find anything about it.

For example, For Netherlands, if I segments my query for campaign stats wby "geo_target_region", the results have provinces and regions segmentation, what is so confusing because I can obtain provinces asking with "geo_target_province". In Japan, I can get Prefectures segmentations asking by "geo_target_region" in the query.

Is there any page to see this crearly? As I said, is so confussing.

My main problem is that, in the case of Germany. I can see in the UI that it has different segmentation values at State and City levels, for example. And we have targeted States and Cities with applied bid modifiers in all of our campaign in a German account. But, when I try yo get this info by the API, there are no results. And I have tried it segmeting by "geo_target_region", "geo_target_state" and "geo_target_city" (separately). In all cases I have no results.

This is the query I am doing:


SELECT
   metrics.conversions,
   metrics.clicks,
   metrics.average_cpc,  
   metrics.conversions_value,
   metrics.cost_micros,
   campaign.name,
   campaign.id,
   segments.geo_target_state
FROM
   user_location_view
WHERE
   segments.date
BETWEEN
   '20230909'
AND
   '20231009'
"""

And the same changing "segments.geo_target_state" by "segments.geo_target_region" and "segments.geo_target_city".

Why I cannot get that results although I am seeing them through the UI?

Thank you,

Iván


Iván López

unread,
Oct 13, 2023, 6:10:16 AM10/13/23
to Google Ads API and AdWords API Forum
In addition, I have the same problem in my German account segmenting by day of week, which is even more strange. This is the query I am trying to do:

SELECT
   metrics.conversions,
   metrics.clicks,
   metrics.average_cpc,
   metrics.cost_micros,
   metrics.conversions_value,
   campaign.name,
   campaign.id,
   segments.day_of_week
FROM
   campaign

WHERE
   segments.date
BETWEEN
   '20230909'
AND
   '2023100'
"""

How can it be possible?

Google Ads API Forum Advisor

unread,
Oct 16, 2023, 9:17:46 AM10/16/23
to ivan....@tidart.com, adwor...@googlegroups.com
Hi Iván,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are seeing the discrepancies while retrieving the data between the Google Ads UI and the Google Ads API. Kindly note that the Google Ads API mirrors the Google Ads UI. We would like to specify first the following when comparing the value of the Google Ads UI and the Google Ads API.
  • The segments and fields of the API and UI should be the same.
  • The date range should also be the same.
  • Comparing the API and UI at the same level as possible.
With that, please provide us with the complete API logs (request and response with request-id and request header) generated along with the uncropped UI screenshot of the Google Ads account at your end to better assist you.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02pRN7D:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages