Dear Google Ads Api Team,
I am building a function to manage Sitelinks. Some of the settings are managed with the "ExtensionFeedItem" function, which controls:
- Startdate
- Enddate
- Scheduling
- Device Preference
I am able to create and update these settings, but once they are created I am not able to remove them again. Especially trouble causes me the "device" setting:
- When I set the device preference to "2" (mobile) it works fine, but when I try to set again to "0" (all devices), the API ignores this input.
- Not indicating the "device" would also do no change in the Sitelink.
- deleting the entire extension feed item would delete the whole Sitelink, which would reset sitelink history, I would like to avoid this if possible.
Could you please help me to see what I am missing?
Many thanks in advance!
Kind regards,
Christoph
Example code of my function:
$extensionsetting = new ExtensionFeedItem([
'resource_name' => 'customers/CUSTOMERID/extensionFeedItems/FEEDITEMID,
'start_date_time' => $STARTDATE,
'end_date_time' => $ENDDATE,
'ad_schedules' => $SCHEDULINGINFO,
'device' => '2'
]);
$adGroupExtensionSettingOperation = new ExtensionFeedItemOperation();
$adGroupExtensionSettingOperation->setUpdate($extensionsetting);
$adGroupExtensionSettingOperation->setUpdateMask(FieldMasks::allSetFieldsOf($extensionsetting));