Select conversion_action_category from asset_group fails

31 views
Skip to first unread message

Álvaro Pineda

unread,
Feb 26, 2025, 2:31:05 AM2/26/25
to Google Ads API and AdWords API Forum
Hi,

This query passes the validator:

SELECT
  customer.id,
  customer.descriptive_name,
  campaign.id,
  campaign.name,
  ad_group.id,
  ad_group.name,
  ad_group_ad.ad.type,
  ad_group_ad.ad.id,
  ad_group_ad.ad.name,
  ad_group_ad.ad.image_ad.image_url,
  segments.ad_network_type,
  metrics.all_conversions,
  metrics.conversions,
  segments.conversion_action_category,
  segments.date
FROM ad_group_ad
WHERE
  ad_group_ad.ad.type NOT IN (VIDEO_TRUEVIEW_IN_STREAM_AD,VIDEO_NON_SKIPPABLE_IN_STREAM_AD,IN_FEED_VIDEO_AD,VIDEO_BUMPER_AD,VIDEO_RESPONSIVE_AD,DEMAND_GEN_VIDEO_RESPONSIVE_AD)
  AND segments.ad_network_type NOT IN (YOUTUBE)
  AND segments.date BETWEEN '2025-01-01' AND '2025-01-31'

but fails executing throwing this error:

[message] => Request contains an invalid argument.
[code] => 3
[status] => INVALID_ARGUMENT
[details] => 
    [@type] => type.googleapis.com/google.ads.googleads.v18.errors.GoogleAdsFailure
    [errors] => 
        [errorCode] => 
            [queryError] => PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE
            [message] => Cannot select or filter on the following segments: 'segments.conversion_action_category'(could not support requested resources: 'ASSET_GROUP'), since segment is incompatible with the resource in the FROM clause or other selected segmenting resources.

Am I missing something in this query?

Thank you in advance

Google Ads API Forum Advisor

unread,
Feb 26, 2025, 5:28:03 AM2/26/25
to alv...@bealion.com, adwor...@googlegroups.com
Hi,

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

The PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE is encountered because a segment may have been included together with a metric that it is incompatible with in the SELECT or WHERE clause. For more information, you may see this document about segmentation

I have verified the GAQL that you have shared, and I could see that it is validated successfully in the Query Validator. Also, I tried to replicate your issue on my end and I'm able to fetch the data successfully while executing the given GAQL query with some random account without any errors. So, I request you try running the query again and let us know how it goes at your end. You can try making a request using the Method:customers.googleAds.search or Method:customers.googleAds.searchStream.

if you still face any issues, kindly provide us with the uncropped UI screenshot by highlighting the fields that you are trying to retrieve from the ad_group_ad report via the Google Ads API.

You can send the details via Reply privately to the author option, or direct private reply to this email.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-02-26 10:27:31Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vH3zG:ref" (ADR-00289858)

 



Álvaro Pineda

unread,
Feb 26, 2025, 8:27:53 AM2/26/25
to Google Ads API and AdWords API Forum
My bad, I tested and pasted a wrong GQL. Im trying to get conversion_action_category from asset_group as per below

SELECT
  asset_group.id,
  asset_group.name,
  segments.date,
  customer.id,
  customer.descriptive_name,
  campaign.id,
  campaign.name,
  segments.conversion_action_category
FROM
  asset_group
WHERE
  segments.date BETWEEN '2025-01-01'
  AND '2025-01-31'
  AND campaign.advertising_channel_type = 'PERFORMANCE_MAX'

This one fails validation and this report doesnt allow that segment (https://developers.google.com/google-ads/api/fields/v18/asset_group)

Any workaround to get conversions categories per asset group?

Thank you again

Google Ads API Forum Advisor

unread,
Feb 26, 2025, 12:52:20 PM2/26/25
to alv...@bealion.com, adwor...@googlegroups.com
Hi,

As per the documentation, 'segments.conversion_action_category' segment is not a valid fileds that can be put in the SELECT clause as the fields of 'asset_group' and currently not supported for 'asset_group'.

I recommend using the Query Builder, an interactive tool for building queries, and the Query Validator to ensure your query is valid.
 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-02-26 17:51:45Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vH3zG:ref" (ADR-00289858)



Reply all
Reply to author
Forward
0 new messages