image extensions not linking through asset link

625 views
Skip to first unread message

Tommy Bradbury

unread,
Apr 13, 2023, 4:32:40 AM4/13/23
to Google Ads API and AdWords API Forum
hi guys, I am currently working on using V13 of the API in order to upload image extensions and link them at a campaign and/or adgroup level. The example code in the SDK currently is showing the soon to be deprecated method which involves creating a feed item etc in order to do this. I am wanting to achieve this using Assets and linking the asset to an entity at the required level. Currently my code is attempting to upload the asset as an image, and then attepting to link that asset to a given level. I seem to be able to upload the asset to google ads system as I am getting a resource id returned. After this I am attempting to link the asset, which has the asset type of "IMAGE", into a campaign/ad group. The issue here is that there are several seemingly relevant AssetFieldType values available, but I have tried each of these (MARKETING_IMAGE, AD_IMAGE, SQUARE_MARKETING_IMAGE), and they are all returning the same error at the point of trying to link: ``` Fault ------- Status code: 3 Failure: {"errors":[{"errorCode":{"assetLinkError":"UNSUPPORTED_FIELD_TYPE"},"message":"The given field type is not supported to be added directly through asset links.","trigger":{"stringValue":"MARKETING_IMAGE"},"location":{"fieldPathElements":[{"fieldName":"operations","index":0},{"fieldName":"create"},{"fieldName":"field_type"}]}}],"requestId":"M35CAIZIoeepuJh1RKVKaw"} [] Log Level: NOTICE ``` My current code looks something like: <?php require "vendor/autoload.php"; use Google\Ads\GoogleAds\V13\Common\ImageAsset; use Google\Ads\GoogleAds\V13\Enums\AssetFieldTypeEnum\AssetFieldType; use Google\Ads\GoogleAds\V13\Resources\Asset; $googleAdsClient = new GoogleClient(); $customerId = "123456789"; $adGroupId = "123456789"; $asset = new Asset([ "name" => $asset['name'], "image_asset" => new ImageAsset(['data' => file_get_contents($asset['url'])]), ]); // upload asset, returns asset resource name eg: // $assetResourceName = "example/1234/example/1234"; $imageExtensionAdGroupAssetOperations = [ new AdGroupAssetOperation([ "create" => new AdGroupAsset([ "asset" => $assetResourceName, "ad_group" => ResourceNames::forAdGroup( $runningJob->getCustomerId(), $adGroupId ), "field_type" => AssetFieldType::MARKETING_IMAGE, ])]) ]; $adGroupAssetServiceClient = $googleAdsClient->getAdGroupAssetServiceClient(); $response = $adGroupAssetServiceClient->mutateAdGroupAssets( $customerId, $imageExtensionAdGroupAssetOperations ); is there any documentation available on what the differences between all of these different AssetFieldType values actually relate to (MARKETING_IMAGE, AD_IMAGE, SQUARE_MARKETING_IMAGE) and why they are not compatible with an IMAGE type asset? is this expected behavior? It seems like there is no way forward that I can see in order to properly link an image asset to any of these asset field types. Or is there some part which I am getting wrong along the way? thanks in advance for clarifying

Google Ads API Forum Advisor

unread,
Apr 13, 2023, 6:03:54 PM4/13/23
to tommy.b...@tfli.co.uk, adwor...@googlegroups.com

Hi Tommy,

I'm from the Google Ads API team.

You may refer here (https://developers.google.com/google-ads/api/docs/extensions/assets/asset-extensions) for the list of supported asset-based extensions in Google Ads API. The documentation also contains instructions on how to create an asset and associate it with a resource.

Having said that, the image asset is not yet on the list of extensions for supporting assets and for the image extensions availability, you may refer to the Image and Location Auto-migrations in Google Ads API (https://ads-developers.googleblog.com/2023/02/image-and-location-auto-migrations-in.html) blog post.

Regards,

Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2kV0tK:ref

Tommy Bradbury

unread,
Apr 14, 2023, 6:56:29 AM4/14/23
to Google Ads API and AdWords API Forum
hi, 

thank you for your response.

In the second link you provided, it states that it will be available any time between now and September 15, 2023. Please can you let me know if there are any more specific details regarding when image extensions are likely going to become available? 

thanks,


Tommy

Google Ads API Forum Advisor

unread,
Apr 14, 2023, 1:47:44 PM4/14/23
to tommy.b...@tfli.co.uk, adwor...@googlegroups.com

Hi Tommy,

Thank you for your response.

With regards to your concern, please note that we will start auto-migrating image and location extensions to assets and the auto-migration is scheduled to end on September 15, 2023.

For more information, please refer to the Image and Location Auto-migrations in Google Ads API blog post (https://ads-developers.googleblog.com/2023/02/image-and-location-auto-migrations-in.html) to check if your account has been migrated already.

As this is not yet supported, what we can do is to advise you to keep an eye on the blog post (https://ads-developers.googleblog.com/search/label/google_ads_api) for the updates and release notes (https://developers.google.com/google-ads/api/docs/release-notes?hl=en) feature releases.

Regards,

Mariam Soady

unread,
Sep 20, 2023, 6:22:22 AM9/20/23
to Google Ads API and AdWords API Forum
Hello Google,

It's Sept 20 now and I still get  UNSUPPORTED_FIELD_TYPE error when setting image asset to search campaign, I use API v14 java sdk, it's listed in documentation that AD_IMAGE assets is supported with CampaignAsset/AdGroupAsset.

Is it still not supported or the issue could be in the campaign? The account is created couple weeks ago and I see here some requirements related to accounts.

Would you please advise.

{"errorCode":{"assetLinkError":"UNSUPPORTED_FIELD_TYPE"},"message":"The given field type is not supported to be added directly through asset links.","trigger":{"stringValue":"AD_IMAGE"},"location":{"fieldPathElements":[{"fieldName":"operations","index":2}]}}

Regards,
Mariam

Daniel Larsson

unread,
Oct 26, 2023, 7:04:47 PM10/26/23
to Google Ads API and AdWords API Forum
Hello Google, I would also like to add "image extensions" using the Google Ads API.

I have tried to link an AD_IMAGE (image asset) to either a campaign or an ad group. I DON’T get UNSUPPORTED_FIELD_TYPE, but the command seems to do nothing.

Should it be possible to add "image extensions" using the Google Ads API? Is AD_IMAGE the AssetFieldType to use?

Regards,
Daniel

Google Ads API Forum Advisor

unread,
Oct 27, 2023, 5:28:45 AM10/27/23
to boda...@gmail.com, adwor...@googlegroups.com
Hi Daniel,

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

By reviewing your concern, I understand that you are seeking information regarding the addition of “image extensions” in the Google Ads API. According to the Blog Post, it has been announced that image and location extensions will automatically transition to assets. Following the migration, new accounts will have the ability to create image and location assets, but they won't be able to create extensions. I would suggest you to follow this Blog Post for further updates. 

To create an image asset via the API, I would recommend you to refer to this “Asset creation and usage” documentation for more information.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02kV0tK:ref"

Thanks,

 
Google Logo Google Ads API Team


Message has been deleted

Google Ads API Forum Advisor

unread,
Apr 25, 2024, 7:41:05 AM4/25/24
to zhenggu...@gmail.com, adwor...@googlegroups.com
Hi,


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

The error "UNSUPPORTED_FIELD_TYPE", this means the given field type is not supported to be added directly through asset links. Kindly note that image extension as an asset is not supported in the Google Ads API as it is not included in the supported asset-based extension types mentioned in the Asset document . This is the reason why you encountered the error as well. With this, you can only add the said type of extension via feed using the Upload Image Asset implementation. You may check the document of Asset types linked to customers, campaigns, and ad groups
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02kV0tK:ref" (ADR-00174696)


Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages