google-ads-api
google-ads-api copied to clipboard
Example feed item extension add
Could somebody assist in what is the right way to create a site_link_feed_item? I have this code where i pass all the details. I keep getting this error "Concrete sub type of ExtensionFeedItem is required for this operation.", even though the extnesion_type is specified.
Would somebody have a working example? Trial and erroring this is taking a long time.
var feed_item_id = -5
const extensionEntity = [
{
entity: 'extension_feed_item',
operation: 'create',
resource: {
resource_name: `customers/${customer_id}/extensionFeedItems/${feed_item_id}`,
extension_type:enums.ExtensionType.SITELINK, //'Sitelink'
status: enums.FeedItemSetStatus.ENABLED,
site_link_feed_item: {
final_urls: [
'https://www.google.com'
],
"link_text": "test",
"line1": "great",
"line2": "stuff",
},
"targetedCampaign": `customers/${customer_id}/campaigns/${campaign_id}`,
}
}
]
const result2 = await customer.mutateResources(extensionEntity);