(php 7.4, google-ads-api v8, grpc with composer library googleads/google-ads-php ^12)
asset_link_error: The given field type is not supported to be added directly via asset links.
The below code is taken straight from the docs
...after
sending the creation as an operation, the asset creation is then sent
successfully, and I can successfully query for the newly created asset.
// Creates an operation to add the asset to the adgroup.
$adGroupAsset = new AdGroupAsset(
[
'ad_group' => $adGroupResourceName,
'asset' => $assetResName,
'field_type' => AssetFieldType::MARKETING_IMAGE,
'status' => AssetLinkStatus::ENABLED,
]
);
$adGroupAssetOperation = new AdGroupAssetOperation();
$adGroupAssetOperation->setCreate($adGroupAsset);
$adGroupAssetServiceClient = $this->googleAdsClient->getAdGroupAssetServiceClient();
$response = $adGroupAssetServiceClient->mutateAdGroupAssets(
$this->clientId,
[$adGroupAssetOperation]
);
I checked, and I can add an image link manually to this same adgroup in the UI!
Any help would be appreciated, there's not much info about this
error in the docs or how to go about adding image extensions to an
adgroup.
Thanks,
Shawn
|
||||||
|
||||||
|
||||||
Hello Algirdas,
Thank you for reaching out to us.
As mentioned by my colleague (Peter) on the previous thread, currently supported asset based extensions are listed here and other types would follow later. In the meantime, we recommend that you keep an eye to our blog for future updates or any announcements on when image extensions can be included.
Regards,
|
||||||