Filter campaigns data on conversion_action_category leads to error

29 views
Skip to first unread message

Stefan Zehr

unread,
Jun 4, 2024, 10:10:54 AM6/4/24
to Google Ads API and AdWords API Forum
Hi,

I added a filter for conversion_action_category into our campaigns data query:

SELECT    cpgn."id" AS campaignid
        , cpgn."name" AS campaignname
  , cpgn."cost_micros"
, cpgn."clicks" AS Clicks
, cpgn."interactions" AS Interactions
, cpgn."conversions" AS Conversions
FROM "GoogleAds.campaign" cpgn  
WHERE cpgn."date" >=  '2024-06-03'
and cpgn."date" <= '2024-06-04'
and cpgn."conversion_action_category" = 'PURCHASE'


But this results in the following error message. Can I do anything to prevent that?


errors {
  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: 'clicks', 'cost_micros', 'interactions')."
}

Google Ads API Forum Advisor

unread,
Jun 4, 2024, 2:09:51 PM6/4/24
to s.z...@group-apo.com, adwor...@googlegroups.com

Hi,

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

I see that you have already raised this concern on another thread with the subject "Google Ads campaigns: PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE" and we have already responded there for this issue. To avoid multiple threads on the same issue, please take a look at that thread and continue the discussion on the same for further updates on the issue. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02tJCk7:ref" (ADR-00238184)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages