Different values of metrics.cost_micros in dependency on segments.click_type presence in query

42 views
Skip to first unread message

Oksana Sulyma

unread,
May 7, 2024, 5:50:36 AM5/7/24
to Google Ads API and AdWords API Forum
Hi Google Ads API team!

I observe very strange behaviour of metrics.cost_micros field for both API V15 and V16 and official google-ads-php library.

Query 1:
SELECT campaign.id, campaign.name, segments.ad_network_type, segments.click_type, segments.date, metrics.impressions, metrics.clicks, metrics.cost_micros FROM campaign WHERE segments.date>='2024-03-18' AND segments.date<='2024-03-18'  AND campaign.id IN (<my campaign id>) ORDER BY segments.date DESC
gives me costMicros":"88480000".

Query 2 (difference from Query 1 in segments.click_type absence only):
SELECT campaign.id, campaign.name, segments.ad_network_type, segments.date, metrics.impressions, metrics.clicks, metrics.cost_micros FROM campaign WHERE segments.date>='2024-03-18' AND segments.date<='2024-03-18'  AND campaign.id IN (<my campaign id>) ORDER BY segments.date DESC
gives me "costMicros": "90013242".

Is there any explanation of such behaviour? 
I'll be happy to share complete request / response log in private correspondence. 
Thanks,
Oksana

Oksana Sulyma

unread,
May 8, 2024, 12:28:44 PM5/8/24
to Google Ads API and AdWords API Forum
Bumping up the thread in case it was not routed to your processing queue Google Ads API team!

Google Ads API Forum Advisor

unread,
May 8, 2024, 5:46:52 PM5/8/24
to adwor...@googlegroups.com
Hi,

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

Based on the provided information, I can see that there are two queries in your response. To assist you better, please elaborate on exactly what strange behavior you are observing for the V15 and V16 API and also provide the complete API logs (request and response with request-id and request header) to further investigate this issue.

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 through direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tIv56:ref" (ADR-00234190)

Thanks,
 
Google Logo Google Ads API Team


Oksana Sulyma

unread,
May 9, 2024, 3:36:59 AM5/9/24
to Google Ads API and AdWords API Forum
Thanks team, I've sent details privately.
Reply all
Reply to author
Forward
0 new messages