How to get CPI(cost per install) for UAC campaign with Ads API?

31 views
Skip to first unread message

Dong Chen

unread,
Apr 16, 2020, 5:00:12 AM4/16/20
to AdWords API and Google Ads API Forum
Hi team,

How to get CPI(cost per install) for UAC with Ads API?  The metrics.cost_micros can not be selected together with segments.conversion_action_name or segments.conversion_action_category. Should I query campaign cost_micros first, then query install numbers? This is not very convenient.

query sql:
select campaign.id, campaign.name, segments.conversion_action_category, metrics.conversions,  metrics.cost_micros from campaign  where  campaign.id = 'xxx' and  segments.date = '2020-04-10' and  metrics.conversions > 0

error:
Request ID 0fs_ACYcCmqlPooYqRfXdA failed due to GoogleAdsException. Underlying errors:
  Error 0: error_code {
  query_error: PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE
}
message: "Cannot select the following segments because at least one unsupported metric is found in SELECT or WHERE clause: \'segments.conversion_action_category\'(unsupported metrics: \'cost_micros\')."

Google Ads API Forum Advisor Prod

unread,
Apr 16, 2020, 2:39:43 PM4/16/20
to adwor...@googlegroups.com
Hi Dong,

Thanks for reaching out.  Your read of the situation is correct; metrics.cost_micros and conversion actions are not selectable simultaneously.  This is intentional.  Your proposed solution is a viable approch.

Please let me know if I can provide further clarity.

Thank you,

Andrew, Google Ads API Team

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