Changing FeedItemDevicePreference from mobile to none for enhanced sitelink adextensions

115 views
Skip to first unread message

Jay

unread,
Sep 9, 2013, 6:59:06 PM9/9/13
to adwor...@googlegroups.com
Hi Folks,

I ran into a little problem trying to change an existing enhanced sitelink's device preference from "MOBILE" to none using FeedItemDevicePreference.  Here is my soap log with request and reply. As I clear out the FeedItemDevicePreference with a null, the results from the "set" operation shows that sitelink's FeedItemDevicePreference is still "MOBILE"

Any help would be most appreciated.

In message: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header>
  <ns1:RequestHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201302">
   <ns1:authToken>.....</ns1:authToken>
   <ns1:clientCustomerId>...</ns1:clientCustomerId>
   <ns1:developerToken>....</ns1:developerToken>
   <ns1:userAgent>...</ns1:userAgent>
   <ns1:validateOnly>false</ns1:validateOnly>
   <ns1:partialFailure>false</ns1:partialFailure>
  </ns1:RequestHeader>
 </soapenv:Header>
 <soapenv:Body>
  <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201302">
   <operations>
    <operator>SET</operator>
    <operand>
     <feedId>1161248</feedId>
     <feedItemId>18468968</feedItemId>
     <startTime>20130923 000000</startTime>
     <attributeValues>
      <feedAttributeId>1</feedAttributeId>
      <stringValue>Jeff Modified Again Test</stringValue>
     </attributeValues>
     <attributeValues>
      <feedAttributeId>2</feedAttributeId>
      <stringValue>http://mimg.test.lala.com/ad/ck?{copy:mprid}&amp;{copy:mpl}&amp;secrid={creative}&amp;senetid={ifsearch:search}{ifcontent:content}-sitelink&amp;mpro=http://www.url.com</stringValue>
     </attributeValues>
    </operand>
   </operations>
  </mutate>
 </soapenv:Body>
</soapenv:Envelope>
= Out message: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201302"><requestId>0004e5fb0e250dc00ae7a78500004825</requestId><serviceName>FeedItemService</serviceName><methodName>mutate</methodName><operations>1</operations><responseTime>332</responseTime><units>0</units></ResponseHeader></soap:Header><soap:Body><mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201302"><rval><ListReturnValue.Type>FeedItemReturnValue</ListReturnValue.Type><value><feedId>1161248</feedId><feedItemId>18468968</feedItemId><status>ACTIVE</status><startTime>20130923 000000 America/Los_Angeles</startTime><attributeValues><feedAttributeId>1</feedAttributeId><stringValue>Jeff Modified Again Test</stringValue></attributeValues><attributeValues><feedAttributeId>2</feedAttributeId><stringValue>http://mimg.test.lala.com/ad/ck?{copy:mprid}&amp;{copy:mpl}&amp;secrid={creative}&amp;senetid={ifsearch:search}{ifcontent:content}-sitelink&amp;mpro=http://www.url.com</stringValue></attributeValues><devicePreference><devicePreference>30001</devicePreference></devicePreference></value></rval></mutateResponse></soap:Body></soap:Envelope>

Cheers,
Jeff

Jay

unread,
Sep 11, 2013, 1:41:11 PM9/11/13
to adwor...@googlegroups.com

Jay

unread,
Sep 11, 2013, 1:42:28 PM9/11/13
to adwor...@googlegroups.com
Hi Folks,

As of today 9/11, we noticed that we can again remove mobile preference from feeditems. Thank you for fixing this.

Jeff

Jay

unread,
Sep 12, 2013, 5:31:24 PM9/12/13
to adwor...@googlegroups.com
We are actually still experiencing this bug today. To change device preference away from MOBILE, we simply set a NULL into the data object, but that still fails to change the preference from MOBILE to NONE.

Any help would be appreciated.

-Jay

Takeshi Hagikura (AdWords API Team)

unread,
Sep 17, 2013, 4:27:14 AM9/17/13
to adwor...@googlegroups.com
Hi Jay,

Are you still experiencing the issue?

If so, can you please share your latest request/response xml logs that are facing the issue?

Best,
- Takeshi, AdWords API Team

Jay

unread,
Sep 17, 2013, 9:11:53 PM9/17/13
to adwor...@googlegroups.com
Hi Takeshi,

Thanks for taking the time to review our issue. We are still experiencing this today, enclosed is the most recent soaplog from a few minutes ago. Scenario is the same where we have an AdExtension on AdWords with mobile preference checked, and we could not remove it.


Best Regards,
Jay


In message: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header>
  <ns1:RequestHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201302">
   <ns1:authToken>.....</ns1:authToken>
   <ns1:clientCustomerId>......</ns1:clientCustomerId>
   <ns1:developerToken>......</ns1:developerToken>
   <ns1:userAgent>.....</ns1:userAgent>

   <ns1:validateOnly>false</ns1:validateOnly>
   <ns1:partialFailure>false</ns1:partialFailure>
  </ns1:RequestHeader>
 </soapenv:Header>
 <soapenv:Body>
  <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201302">
   <operations>
    <operator>SET</operator>
    <operand>
     <feedId>1161248</feedId>
     <feedItemId>21426248</feedItemId>
     <startTime>00000101 000000</startTime>
     <endTime>00000101 000000</endTime>
     <attributeValues>
      <feedAttributeId>1</feedAttributeId>
      <stringValue>desantura.ru</stringValue>

     </attributeValues>
     <attributeValues>
      <feedAttributeId>2</feedAttributeId>

     </attributeValues>
    </operand>
   </operations>
  </mutate>
 </soapenv:Body>
</soapenv:Envelope>
= Out message: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201302"><requestId>0004e69e04c5be200ae77d4a00004334</requestId><serviceName>FeedItemService</serviceName><methodName>mutate</methodName><operations>1</operations><responseTime>159</responseTime><units>0</units></ResponseHeader></soap:Header><soap:Body><mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201302"><rval><ListReturnValue.Type>FeedItemReturnValue</ListReturnValue.Type><value><feedId>1161248</feedId><feedItemId>21426248</feedItemId><status>ACTIVE</status><attributeValues><feedAttributeId>1</feedAttributeId><stringValue>desantura.ru</stringValue></attributeValues><attributeValues><feedAttributeId>2</feedAttributeId><stringValue>http://img.mediaplex.com/ad/ck?{copy:mprid}&amp;{copy:mpl}&amp;secrid={creative}&amp;senetid={ifsearch:search}{ifcontent:content}-sitelink&amp;mpro=http://www.desantura.ru</stringValue></attributeValues><devicePreference><devicePreference>30001</devicePreference></devicePreference></value></rval></mutateResponse></soap:Body></soap:Envelope>


Takeshi Hagikura (AdWords API Team)

unread,
Sep 24, 2013, 6:10:11 AM9/24/13
to adwor...@googlegroups.com
Hi Jay,

Apologies for responding it late, I'm able to update the devicePreference by sending devicePreference as null.

like this xml.

<?xml version="1.0" encoding="UTF-8"?>
  <soapenv:Header>
    <ns1:RequestHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201306">
      <ns1:authToken xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201306">******</ns1:authToken>
      <ns1:clientCustomerId>***</ns1:clientCustomerId>
      <ns1:developerToken>****</ns1:developerToken>
      <ns1:userAgent>INSERT_COMPANY_NAME (AwApi-Java/8.12.1, Axis/1.4, Java/1.7.0-google-v5, legacy)</ns1:userAgent>
      <ns1:validateOnly>false</ns1:validateOnly>
      <ns1:partialFailure>false</ns1:partialFailure>
    </ns1:RequestHeader>
  </soapenv:Header>
  <soapenv:Body>
      <operations>
        <operator>SET</operator>
        <operand>
          <feedId>1968</feedId>
          <feedItemId>80088</feedItemId>
          <devicePreference/>
        </operand>
      </operations>
    </mutate>
  </soapenv:Body>
  </soapenv:Envelope>
[24 Sep 2013 19:06:07,808 - DEBUG]
<?xml version="1.0" encoding="UTF-8"?>
  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
      <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201306">
        <requestId>0004e71e490b44a80a42194900002008</requestId>
        <serviceName>FeedItemService</serviceName>
        <methodName>mutate</methodName>
        <operations>0</operations>
        <responseTime>100</responseTime>
      </ResponseHeader>
    </soap:Header>
    <soap:Body>
      <mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201306">
        <rval>
          <ListReturnValue.Type>FeedItemReturnValue</ListReturnValue.Type>
          <value>
            <feedId>1968</feedId>
            <feedItemId>80088</feedItemId>
            <status>ACTIVE</status>
            <startTime>20131010 101010 Asia/Tokyo</startTime>
            <endTime>20131110 101010 Asia/Tokyo</endTime>
            <attributeValues>
              <feedAttributeId>1</feedAttributeId>
              <stringValue>http://code.google/</stringValue>
            </attributeValues>
            <attributeValues>
              <feedAttributeId>2</feedAttributeId>
              <stringValue>http://code.google.com/p/google-api-adwords-java/wiki/NoClientLibrary</stringValue>
            </attributeValues>
            <scheduling>
              <feedItemSchedules>
                <dayOfWeek>MONDAY</dayOfWeek>
                <startHour>4</startHour>
                <startMinute>FIFTEEN</startMinute>
                <endHour>7</endHour>
                <endMinute>FORTY_FIVE</endMinute>
              </feedItemSchedules>
              <feedItemSchedules>
                <dayOfWeek>MONDAY</dayOfWeek>
                <startHour>8</startHour>
                <startMinute>FIFTEEN</startMinute>
                <endHour>20</endHour>
                <endMinute>FORTY_FIVE</endMinute>
              </feedItemSchedules>
            </scheduling>
          </value>
        </rval>
      </mutateResponse>
    </soap:Body>
  </soap:Envelope>



Or the code snippet for Java is like this.

    FeedItem feedItem = new FeedItem();
    feedItem.setFeedId(feedId);
    feedItem.setFeedItemId(feedItemId);
    FeedItemDevicePreference feedItemDevicePreference = new FeedItemDevicePreference();
    feedItemDevicePreference.setDevicePreference(null);
    feedItem.setDevicePreference(feedItemDevicePreference);

    FeedItemOperation operation = new FeedItemOperation();
    operation.setOperand(feedItem);
    operation.setOperator(Operator.SET);


Can you please try that?

Best,
- Takeshi, AdWords API Team

Jay

unread,
Sep 24, 2013, 1:25:34 PM9/24/13
to adwor...@googlegroups.com
Hi Takeshi,

Thanks for your help. I was directly setting a null in setDevicePreference() which is wrong. It is working perfectly now.


Best Regards,
Jay




Reply all
Reply to author
Forward
0 new messages