The given field type is not supported to be added directly through asset links

43 views
Skip to first unread message

Antony Kyalo Musyoki

unread,
Oct 16, 2024, 6:53:00 PM10/16/24
to Google Ads API and AdWords API Forum
I am attempting to add a Structure Snippet asset to a Performance Max Asset Group using the code sample below.  

I get this error when I attempt to execute the code
FaultMessage: The given field type is not supported to be added directly through asset links.

The Python code running us is below. From research I have done so far it seems to indicate that for STRUCTURED_SNIPPET AssetFieldType The asset is linked for use as a Structured Snippet extension

How do I setup a Structured Snippet extension

# Creates a new mutate operation for a suggested structured-snippet asset and link it to the asset group.
asset_mutate_operation = client.get_type("MutateOperation")
asset = asset_mutate_operation.asset_operation.create
asset.resource_name = googleads_service.asset_path(
customer_id, hotels_next_temp_id
)
asset.structured_snippet_asset.header = "Amenities"
asset.structured_snippet_asset.values.extend(['Pool', 'Business Center', "Free Parking", "Airport Shuttle"])
operations.append(asset_mutate_operation)

# Creates a new mutate operation for a structured-snippet asset group.
asset_group_asset_mutate_operation = client.get_type("MutateOperation")
asset_group_asset = (
asset_group_asset_mutate_operation.asset_group_asset_operation.create
)
asset_group_asset.asset = googleads_service.asset_path(
customer_id, hotels_next_temp_id
)
asset_group_asset.asset_group = asset_group_resource_name
asset_group_asset.field_type = client.enums.AssetFieldTypeEnum.STRUCTURED_SNIPPET

operations.append(asset_group_asset_mutate_operation)

Google Ads API Forum Advisor

unread,
Oct 17, 2024, 11:52:18 AM10/17/24
to bookinghub...@gmail.com, adwor...@googlegroups.com
Hi,

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

Based on the information provided, it appears you are attempting to link a STRUCTURED_SNIPPET asset to a Performance Max campaign asset group, and encountering the UNSUPPORTED_FIELD_TYPE error. This is because Performance Max campaigns do not support STRUCTURED_SNIPPET assets, which is why you're seeing this error. I would recommend you to refer to the 'Use the asset in an ad' documentation, which outlines which asset types are supported by various ad and campaign types in the Google Ads API. 

I hope this clarifies. 
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGese:ref" (ADR-00271993)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages