No cost after adding click_type

114 views
Skip to first unread message

Igor Selitsky

unread,
Aug 21, 2023, 11:59:28 AM8/21/23
to Google Ads API and AdWords API Forum
Hi, I see that cost disappeared after adding click_type in some cases.

I check this on campaign and ad_group_ad reports.

Here is requests for campaign reports:

Request without click type:
SELECT campaign.id, metrics.cost_micros , metrics.clicks
FROM campaign WHERE segments.date = '2023-08-01'
AND campaign.id=20347472326
ORDER BY campaign.id

Response without click type – I see non-zero costs and clicks:
[
{
"results": [
{
"campaign": {
"resourceName": "customers/6366357327/campaigns/20347472326",
"id": "20347472326"
},
"metrics": {
"clicks": "158",
"costMicros": "45445996"
}
}
],
"fieldMask": "campaign.id,metrics.costMicros,metrics.clicks",
"requestId": "0V4ptU_bLPC2srujl948lQ"
}
]

Request wit click type:
SELECT segments.click_type, campaign.id, metrics.clicks,
metrics.cost_micros
FROM campaign WHERE segments.date = '2023-08-01' AND campaign.id = 20347472326
ORDER BY campaign.id

Response with click type – same amount of clicks (13+21+124=158), but no costs:
[
{
"results": [
{
"campaign": {
"resourceName": "customers/6366357327/campaigns/20347472326",
"id": "20347472326"
},
"metrics": {
"clicks": "13",
"costMicros": "0"
},
"segments": {
"clickType": "LOCATION_EXPANSION"
}
},
{
"campaign": {
"resourceName": "customers/6366357327/campaigns/20347472326",
"id": "20347472326"
},
"metrics": {
"clicks": "121",
"costMicros": "0"
},
"segments": {
"clickType": "VIDEO_WEBSITE_CLICKS"
}
},
{
"campaign": {
"resourceName": "customers/6366357327/campaigns/20347472326",
"id": "20347472326"
},
"metrics": {
"clicks": "24",
"costMicros": "0"
},
"segments": {
"clickType": "UNKNOWN"
}
}
],
"fieldMask": "segments.clickType,campaign.id,metrics.clicks,metrics.costMicros",
"requestId": "iaM_zNcvtc91xzr6mwtdfw"
}
]


Message has been deleted

Igor Selitsky

unread,
Aug 24, 2023, 11:45:27 AM8/24/23
to Google Ads API and AdWords API Forum
Thank you for the answer.

"This is because of the segmentation effect where when adding some segments, the metrics in the summary row may decrease."

May this (summary decrease) affect all segments/reports in some cases? 
For example segments:
* device, 
* ad_network_type,
* ad_destination_type
and reports:
* campaign
* ad_group_ad
* click_view.



On Tuesday, August 22, 2023 at 3:40:23 PM UTC+3 Google Ads API Forum Advisor wrote:
Hi,

Thank you for raising this concern to the Google Ads API support team.

Upon checking, it appears that your query contains the segment field, segments.click_type. Kindly note that the Google Ads API mirrors the Google Ads UI/Interface which means that the API should be able to retrieve the exact data that the UI is showing.

This is because of the segmentation effect where when adding some segments, the metrics in the summary row may decrease. For example, when segments.keyword.info.match_type is added to a query with FROM ad_group_ad, that segment is telling the query to only get the rows of data that have keywords, and remove any row that is not associated with a keyword. In this case, the metrics would be lower because it would exclude any non-keyword metrics. Another example is adding segments.device to a query, results in a report with a row for each combination of device and the specified resource in the FROM clause, and the statistical values (impressions, clicks, conversions, etc.) split between them. More of the details regarding this can be found in this Segmentation (https://developers.google.com/google-ads/api/docs/reporting/segmentation) guide.

Moreover, upon checking, it appears that the Google Ads UI is also showing 0 costs data. That said, I would suggest reaching out to the Google Ads Product support team (https://support.google.com/google-ads/gethelp) as they are the appropriate team who can provide guidance to UI-related details.

Image_2023-08-22_20-33-38.png
 
This message is in relation to case "ref:_00D1U1174p._5004Q2o72wT:ref"

Thanks,
 
Google Logo Google Ads API Team


Igor Selitsky

unread,
Sep 4, 2023, 4:08:29 AM9/4/23
to Google Ads API and AdWords API Forum
Any updates here?

Google Ads API Forum Advisor

unread,
Sep 4, 2023, 8:19:26 AM9/4/23
to adwor...@googlegroups.com

Hi Igor,



It appears that you were not able to receive our team's previous response. With that, allow for me to reiterate. Your understanding is correct for the mentioned segmentation fields as, adding those segments, the metrics in the summary row may decrease.



Let us know if you have any further clarifications.

Reply all
Reply to author
Forward
0 new messages