geographic_view doesn't return data when segments.geo_target_metro is empty

871 views
Skip to first unread message

Elżbieta Jakubska

unread,
Oct 29, 2020, 2:09:06 AM10/29/20
to AdWords API and Google Ads API Forum
Hi,
I am trying to migrate geo targeting reports from AdWords API to Ads API. I am doing the following query:

my $query = q{ SELECT
        geographic_view.country_criterion_id,
        geographic_view.location_type,
        segments.geo_target_region,
        segments.geo_target_city,
        segments.geo_target_metro,
        customer.currency_code,
        customer.descriptive_name,
        segments.device, 
        segments.date,
        segments.year,
        segments.day_of_week,
        segments.month,
        segments.quarter,
        segments.week,
        metrics.clicks,
        metrics.cost_micros,
        metrics.impressions,
        metrics.conversions,
        metrics.conversions_value,
        metrics.all_conversions,
        metrics.all_conversions_value,
        metrics.interactions 
        FROM
        geographic_view
        WHERE segments.date BETWEEN 20201027 AND 20201027
        and campaign.id in (1234) 
    };
I'm getting empty report. When I remove segments.geo_target_metro - I'm getting the similar data as from AdWords API. I can see, that in data from adwords API this dimension (geo_target_metro) is always empty for this case.
Also I noticed, that I'm not getting rows for empty city, etc, so the metrics numbers are a little different depending on dimensions.

I'm using python libs in version 7.0. Am I doing something wrong?

Thank you for your feedback,

Regards,
Ela
Message has been deleted
Message has been deleted

Elżbieta Jakubska

unread,
Oct 29, 2020, 5:55:53 AM10/29/20
to AdWords API and Google Ads API Forum
To illustrate the differences depending on dimensions:

1.when using the following set of dimensions:

geographic_view.country_criterion_id,
geographic_view.location_type,
customer.currency_code,customer.descriptive_name,
segments.device,
segments.date,segments.year,segments.day_of_week,segments.month,segments.quarter,segments.week,

I'm getting 2033 views - exactly the same number as from AdWords API
2. + segments.geo_target_region  => I'm getting 1840 views (missing rows are those with no geo_target_region)
3. +segments.geo_target_city => I'm getting 1732 views
4. +segments.geo_target_metro => I'm getting 1791 views

Google Ads API Forum Advisor Prod

unread,
Oct 29, 2020, 3:47:35 PM10/29/20
to e.bar...@gmail.com, adwor...@googlegroups.com
Hello,

Do the numbers for these reports match what you see in the UI? What is your CID? Please share these details through reply privately to author so I can take a closer look.

Regards,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q275Y42:ref

Elżbieta Jakubska

unread,
Oct 30, 2020, 4:09:24 AM10/30/20
to AdWords API and Google Ads API Forum
Hi,
I do not have permissions to reply to the author only.

I'm not an expert in your UI, but if I enter Reports->Custom->Table->Location
and I'm taking dimensions + metrics like:
(I'm looking on different customer than before)  
Country + Impressions => 1279 impressions 
Country + Regions + Impressions => 1244 impressions
Country + Regions + Cities + Impressions => 1082 impressions
When I select "Metro area" => I'm getting message "No statistics match your filters"

And I checked also requests via API and I'm getting exactly the same through API

I do not see a word about this behavior of geographic_view in the documentation, so I'm guess it is a bug. I guess it should be union, not intersection of results for all dimensions, like it was in old AdWords API.

From AdWords API I'm getting 1279 impressions no matter what dimensions I'm requesting, and I understand this is the correct behavior.

Thank you for the reply and your help.

Best,
Ela

Google Ads API Forum Advisor Prod

unread,
Oct 30, 2020, 3:25:36 PM10/30/20
to e.bar...@gmail.com, adwor...@googlegroups.com
Hi Ela,

Since this behavior is not limited to the API, it doesn't appear to be API related. I would advise reaching out to the product team to see why this data is broken down this way. You can contact them though here.


Regards,
Anthony
Google Ads API Team

Google Logo
Anthony Madrigal
Google Ads API Team
 
 
 

ref:_00D1U1174p._5004Q275Y42:ref

Elżbieta Jakubska

unread,
Nov 3, 2020, 6:27:58 AM11/3/20
to AdWords API and Google Ads API Forum
Hi,
I was contacting with Google Ads Support and I've got the following reply:

>>>
Hi Ela,
thanks for your E-Mail.
I have double-checked with my Manager and I can't assist you with your Inquiry. This is a Case for the API Team. Therefor I kindly ask you to E-Mail googleadsa...@google.com, and they will happily help you with your inquiry.
In case you have any further questions, please do not hesitate to contact me. Until then, I wish you a lovely day and stay safe.

Sincerely,
Jessica
>>>>

I sent also the email to googleadsa...@google.com, but for now no response. Please let me know, if you can somehow help me with this problem, as it seems like nobody feels responsible for this area.

Thank you!

Regards,
Ela

Scott Vaillancourt

unread,
Nov 5, 2020, 11:47:02 AM11/5/20
to AdWords API and Google Ads API Forum
I have this question as well. When I pull a report using the AdWords API for a campaign, all of the data returned includes occurrences where no metro area is attached. However, when I use the geographic_view in the new Ads API, no data is returned if the metro area is blank, causing the metrics to be underreported. If I use the campaign view then all of the metrics are accurate.

Scott

Google Ads API Forum Advisor Prod

unread,
Nov 5, 2020, 3:32:57 PM11/5/20
to sc...@lionhurst.com, adwor...@googlegroups.com
Hi Scott,

There is a bit of a difference between the AdWords API and the Google Ads API, but that is because some changes are being made over time to make way for new features. When you segment on a value, segments will consider if the metrics are null. With Google Ads API, if the metrics are null for that value (such as a metro area), then we don't return that value. We don't have any formulas that takes the total and minuses the other values to create 'Other'. There is no 'Other' category since it is not possible with how the data is stored. So, this is the main reason why the reports are differing for you. 


Regards,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 


 

ref:_00D1U1174p._5004Q275Y42:ref

Mario Ochoa

unread,
Oct 14, 2021, 10:05:10 AM10/14/21
to AdWords API and Google Ads API Forum
Is there any workaround to get those records where the segment (metro area) is null?

Google Ads API Forum Advisor

unread,
Oct 15, 2021, 12:04:25 PM10/15/21
to mario...@mojix.com, adwor...@googlegroups.com
Hi Mario,

Can you please try specifying in your WHERE clause that the metro area segment is not equal to a null value? Otherwise, you may try creating multiple reports, using different segments in each report.

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q275Y42:ref

Mario Ochoa

unread,
Oct 18, 2021, 11:38:43 AM10/18/21
to AdWords API and Google Ads API Forum
Hello Anthony, my problem is similar to the one mentioned in this thread. 

Using the AdWords API I'm able to get those records where the city has a blank/null/empty value (as shown in the file). But when using the Google Ads API I can't get records where segment.city is blank. What I want is to get those records where the city is blank using the Google Ads API to get the same information with both API and compare the results and evaluate if it is feasible to migrate from AdWords to Google Ads.
Missing Report Rows for Barrera Investments - 20211011 + 20211012.csv

Google Ads API Forum Advisor

unread,
Oct 18, 2021, 4:50:05 PM10/18/21
to mario...@mojix.com, adwor...@googlegroups.com
Hi Mario,

In addition to the data that you provided in your last post, can you please privately provide us with your complete request and response logs?

Boris DETRY

unread,
Feb 3, 2022, 7:44:31 AM2/3/22
to Google Ads API and AdWords API Forum
I believe this is the correct behavior but it complicates our programs. 

Downloading multiple reports with/without segment and then merging these results could turn into an extremely heavy process.

For example: 
Imagine I have 4 millions search terms and only 1 million has keywords, to make one single collection of these two results and avoiding duplicates it requires a double loop (4M * 1M = 4,000,000,000,000 loops). 
We could also do multiple request to the API using NOT_IN clause in filter but API only allows 20k items in IN clauses, so we need to batch, and process to remove duplicated results of each batched results could be pretty heavy too. 

What other workaround we have? 

Anyway, one cool solution would be if in the next version of the API you allow getting segmented results with segment = null.

Google Ads API Forum Advisor

unread,
Feb 11, 2022, 5:54:50 PM2/11/22
to bo...@jvweb.fr, adwor...@googlegroups.com
Hi Boris,

Right now, I don't see a good way of processing this data better than how you mentioned. If we support segment = null, then that leads to a combinatorial increase in rows returned as you add more segments, so I don't think that's a feasible change either.

Cheers
Anash

ref:_00D1U1174p._5004Q275Y42:ref
Reply all
Reply to author
Forward
0 new messages