Associate an Image Asset to a Campaign using a CampaignAsset

120 views
Skip to first unread message

SeriousJ

unread,
Dec 8, 2021, 9:01:30 AM12/8/21
to AdWords API and Google Ads API Forum
I have Image Assets that are used for Campaign extensions.

I successfully migrated all my Feed-based extensions to Asset-based extensions, except for my Campaign Image extensions.

It seems to be not possible to create a CampaignAsset to link and Image Asset to a Campaign. In other words, the following PHP code can not work:

$campaignAsset = new CampaignAsset([
                'asset' => <resourceName>,
                'field_type' => AssetFieldType::IMAGE,
                'campaign' => ResourceNames::forCampaign($customerId, $campaignId)
        ]);


because AssetFieldType::IMAGE does not exist.

It still works if I use an image_feed_item to create Campaign Image extensions. But your documentation says that Feed services will soon be deprecated.

What should I do?

Google Ads API Forum Advisor

unread,
Dec 9, 2021, 11:36:20 AM12/9/21
to j...@miratech.fr, adwor...@googlegroups.com

Hi,

Thanks for reaching out to us.

Yes, setting AssetFieldType to IMAGE is not supported. However, you may see these supported enums for the AssetFieldType in the CampaignAsset. I’ve reached out to the rest of the team in order to create campaign image extensions without feed services. We will reach out to you once we have updates.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2SdA7A:ref

Google Ads API Forum Advisor

unread,
Dec 10, 2021, 1:11:54 PM12/10/21
to adwor...@googlegroups.com, j...@miratech.fr
Hello - 

It's currently not possible to migrate your image extensions to Assets, but that functionality is on the horizon. Keep an eye on our developer blog for more details.

Thanks,
Ben, Google Ads API Team

ref:_00D1U1174p._5004Q2SdA7A:ref
Reply all
Reply to author
Forward
0 new messages