Hi,
You can specify the FeedId
<https://developers.google.com/adwords/api/docs/reference/v201702/AdGroupExtensionSettingService.SitelinkFeedItem#feedid>
and
the FeedItemId
<https://developers.google.com/adwords/api/docs/reference/v201702/AdGroupExtensionSettingService.SitelinkFeedItem#feeditemid>
of
the existing Sitelink in the SitelinkFeedItem
<https://developers.google.com/adwords/api/docs/reference/v201702/AdGroupExtensionSettingService.SitelinkFeedItem>
as
shown below to use existing Sitelinks in an AdGroupExtensionSetting
<https://developers.google.com/adwords/api/docs/reference/v201702/AdGroupExtensionSettingService.AdGroupExtensionSetting>
:
$sitelink = new SitelinkFeedItem($feedId, $feedItemId);
$sitelinks[] = $sitelink;
//create AdGroup extension setting
$adGroupExtensionSetting = new AdGroupExtensionSetting();
$adGroupExtensionSetting->setAdGroupId($adGroupId);
$adGroupExtensionSetting->setExtensionType(FeedType::SITELINK);
$adGroupExtensionSetting->setExtensionSetting(new ExtensionSetting());
$adGroupExtensionSetting->getExtensionSetting()->setExtensions(
$sitelinks);
// Create a campaign extension setting operation and add it to the list.
$operation = new AdGroupExtensionSettingOperation();
$operation->setOperator(Operator::ADD);
$operation->setOperand($adGroupExtensionSetting);
$operations = [$operation];
// Perform the mutate operation to add the sitelinks
$result = $adGroupExtensionSettingService->mutate($operations);
Regards,
Shwetha, AdWords API Team.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/0d09c432-475d-4b0d-b66f-3e6d45a6aac1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.