Google ads reports.

143 views
Skip to first unread message

Sai ashish

unread,
Jan 19, 2022, 10:11:29 AM1/19/22
to Google Ads API and AdWords API Forum
Hi,
I am using the google ads api to fetch reports about my ads. I need all the basic metrics along with the region code. So this is the query that I am using.

SELECT
campaign.advertising_channel_type,
customer.descriptive_name,
metrics.interactions,
metrics.impressions,
metrics.clicks,
metrics.video_views,
metrics.all_conversions,
metrics.cost_micros,
segments.date,
segments.geo_target_region,
ad_group.type
FROM geographic_view
WHERE segments.date >= '2020-12-01' AND segments.date <= '2021-12-31'
Using this query my cost_micros is 1098570138998.0

How ever the cost in my console is 1103011621635.0
When I remove segments.geo_target_region from my query then my cost_micros matches the same as the one in my console.

Not sure what is happening. Appreciate any help.

Google Ads API Forum Advisor

unread,
Jan 20, 2022, 12:48:57 AM1/20/22
to adwor...@googlegroups.com

Hi,

Thanks for reaching out to the Google Ads API Forum.

Upon checking your GAQL, I can see that segment field were added in your select clause causing this behavior. With this, you would need to ensure that you are using the same fields, filters and date ranges in the API and UI. The general rules of reconciling a report from reports in the Ads UI with a report from the Ads API is to check that the "row fields" in the UI reflect the segmenting fields of the API and that the filters in the UI reflect the "WHERE" clause in the API.

As you mentioned that when you removed segments.geo_target_region segment field from your query, then cost_micros matches the same Ads UI console. This is because segmentation causes the loss of any metric that doesn't fit into each and every segment. For example, if you segment by target region, then all metrics that occur in a rural area don't get reported in the report that includes a target region segment. Adding more segmentation could limit even more metrics.

Hope this helps. Let us know if you have any further questions.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2VNQ16:ref

Sai ashish

unread,
Jan 20, 2022, 3:23:16 AM1/20/22
to Google Ads API and AdWords API Forum
Hi, 
Thank you for your response. I extracted data from the adwords API and got the geo_target_segments. Some of the segments were Null. But in the newer ads API. Null segments are omitted. Is it possible to get the geo_target_region to not omit the null values. This would solve the problem of the cost not matching up. 

Google Ads API Forum Advisor

unread,
Jan 20, 2022, 3:21:14 PM1/20/22
to adwor...@googlegroups.com
Hi,

I work with Yasar and will assist you. Could you privately provide us a full screen screenshot of the UI showing the 'null' regions with metrics? The new API can only be a conduit to the new product as shown in the new UI, if it exists in the new UI we may support it in the new API.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2VNQ16:ref

Sai ashish

unread,
Jan 21, 2022, 5:55:07 AM1/21/22
to Google Ads API and AdWords API Forum
Hi, 
The 'Null' regions in the metrics was extracted from the older adwords API. Not from the UI screen. 
I extracted data from both the older adwords API and the newer ads API. The sum of cost in the older api matches the one in console as it includes records in which the region is NULL. 
However in the newer api the records with region NULL are omitted which lowers the cost a little bit.
I want to know if there is a way to get those NULL records in the newer API similar to the old one.
Thanks

Google Ads API Forum Advisor

unread,
Jan 23, 2022, 10:14:35 PM1/23/22
to adwor...@googlegroups.com
Hi Sai,

You may refer to this section of our segmentation guide, for more information on reporting behavior when using segments. That said, the metrics that are not included in the report when the segments.geo_target_region is null indicates that those may not be associated to a geo target region and could belong a different segment field.

Also, as described in the (When adding some segments, the metrics in the summary row may decrease) section when you segment a report, records relevant to the segment field will be included while those that are not associated to the said segment field would be excluded.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


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