Tuesday, 29 March 2016

Re: What is the expected method for sharing sitelinks across campaigns using the Campaign Extension Setting service?

Hi Albert,

I simplified the add sitelinks to a campaign example and gave this a try. I simplified it where I only did the first sitelink feed item with the Store Hours

Step 1: I called the CampaignExtensionSettingServices and added the my first site link to one campaign (in this case campaign ID 346166693). Here's the SOAP request and response:

[29 Mar 2016 13:56:42,285 - INFO ] Outgoing Request:
<SOAP-ENV:Body><mutate xmlns="https://adwords.google.com/api/adwords/cm/v201603"><operations><operator>ADD</operator><operand><campaignId>346166693</campaignId><extensionType>SITELINK</extensionType><extensionSetting><extensions xsi:type="SitelinkFeedItem" ><sitelinkText>Store Hours</sitelinkText><sitelinkFinalUrls><urls>http://www.example.com/storehours</urls></sitelinkFinalUrls></extensions></extensionSetting></operand></operations></mutate></SOAP-ENV:Body>
[29 Mar 2016 13:56:42,865 - INFO ] Incoming response:
<soap:Body><mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201603"><rval><ListReturnValue.Type>CampaignExtensionSettingReturnValue</ListReturnValue.Type><value><campaignId>346166693</campaignId><extensionType>SITELINK</extensionType><extensionSetting><extensions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SitelinkFeedItem"><feedId>26419921</feedId><feedItemId>3856853919</feedItemId><status>ENABLED</status><feedType>SITELINK</feedType><ExtensionFeedItem.Type>SitelinkFeedItem</ExtensionFeedItem.Type><sitelinkText>Store Hours</sitelinkText><sitelinkFinalUrls><urls>http://www.example.com/storehours</urls></sitelinkFinalUrls></extensions><platformRestrictions>NONE</platformRestrictions></extensionSetting></value></rval></mutateResponse></soap:Body>


Now I had an existing sitelink feed item ID: 3856853919

Step 2: Create another CampaignExtensionSetting for a different campaign (in this case 346505693). Reuse the feed item ID from earlier by setting that feed item ID (3856853919) as the only field set in the SiteLinkFeedItem.


[29 Mar 2016 14:03:01,170 - INFO ] Outgoing Request:
<SOAP-ENV:Body><mutate xmlns="https://adwords.google.com/api/adwords/cm/v201603"><operations><operator>ADD</operator><operand><campaignId>346505693</campaignId><extensionType>SITELINK</extensionType><extensionSetting><extensions xsi:type="SitelinkFeedItem" ><feedItemId>3856853919</feedItemId></extensions></extensionSetting></operand></operations></mutate></SOAP-ENV:Body>
[29 Mar 2016 14:03:01,500 - INFO ] Incoming response:
<soap:Body><mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201603"><rval><ListReturnValue.Type>CampaignExtensionSettingReturnValue</ListReturnValue.Type><value><campaignId>346505693</campaignId><extensionType>SITELINK</extensionType><extensionSetting><extensions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SitelinkFeedItem"><feedId>26419921</feedId><feedItemId>3856853919</feedItemId><status>ENABLED</status><feedType>SITELINK</feedType><ExtensionFeedItem.Type>SitelinkFeedItem</ExtensionFeedItem.Type><sitelinkText>Store Hours</sitelinkText><sitelinkFinalUrls><urls>http://www.example.com/storehours</urls></sitelinkFinalUrls></extensions><platformRestrictions>NONE</platformRestrictions></extensionSetting></value></rval></mutateResponse></soap:Body>

Result: Based on the response, you can see that the feed item ID that you get back is the same one you put in. Plus, you get back all the other details such as the site link text. I checked in the AdWords UI to make sure it was really the same site link by changing the site link text of Store Hours to Store Hours 1 in one campaign and then checking in the other campaign to see if the change was reflected. It looks like in the end I only ended up with one site link.

Please take a look at this and compare it to what you have. Perhaps, there's one field that you need to tweak in your code in order to get it to work. If you're still experiencing issues, I would be happy to take a more in-depth look.

Cheers,
Nadine, AdWords API Team

On Tuesday, March 29, 2016 at 4:53:25 AM UTC-4, Albert Wang wrote:
I think I am mis understanding  this thread a bit. 

so are you saying, sharing sitelink feed items cross campaigns are impossible because it is done in one mutate call ?  and if sharing is needed use the legacy API ?
this actually fits my original understanding toward the extension documentation. 

I've tried a few ways to share the sitelink feed items using extension service. 
- two extension in one call, -> useless different sitelink feed item id returned
- setting ids to the new sitelink item -> useless, different sitelink feed item id retruned.




On Tuesday, September 15, 2015 at 7:51:25 AM UTC+8, Nadine Sundquist (AdWords API Team) wrote:
Hi Alex,

For Extension Settings Services, we don't separate the process of creating the site link from attaching it to a campaign. It's all done in one mutate call. We still have the feed services option because there are a few cases where it could be useful to use feeds.

Each of our client libraries have examples on creating site links. Here's an AddSiteLinks example in Java, if you want to take a look. You'll want to add a CampaignExtensionSetting with your associated SiteLinkFeedItems for each campaign.

Best,
Nadine, AdWords API Team

On Monday, September 14, 2015 at 10:13:37 AM UTC-4, Alexander Cavalli wrote:
Hi Umesh,

Thanks for the suggestion, that was what I was originally considering doing. But it seems like that will make different sitelinks across the campaigns, unless I use sitelinks that already exist (i.e. ones that I have the Adwords IDs for) and the SET operation within mutate. I'd like to share the sitelinks across the multiple campaigns, since they will actually be the same sitelinks (and I'd rather not store a mapping between the unified sitelink on my end on the many different sitelinks on the Adwords end). It sounds like in order to do this with the ExtensionSetting services I'd have to go with the approach I originally suggested: ADD to one campaign (to get the IDs), and then SET on the remaining campaigns. If that's the case, that's fine, I was just wondering if there was some way to separate the implicit creation of the sitelinks happening on the ADD step from the campaign-sitelink mapping happening on both the ADD and SET steps. 

Thanks again for the help,
- Alex

On Thursday, September 10, 2015 at 4:45:13 PM UTC-5, Umesh Dengale wrote:
Hi Alex,

Yes, you are correct. The CustomerExtensionSettingService will apply the sitelinks to all campaigns in the account. You could use the CampaignExtensionSettingService to add the sitelinks to specific campaigns.  You could create the CampaignExtensionSettingOperation for an individual campaign and pass these CampaignExtensionSettingOperation objects (Campaigns you want to add the sitelinks) to an array as input to the CampaignExtensionSettingService.mutate operation.

Thanks,
Umesh, 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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
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 adwords-api+unsubscribe@googlegroups.com.
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/e573b311-6aec-4ea7-bdc4-f5d4a6706b4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment