When using AdGroupAdService to create a new template ad (template ID 432 
image app install ads), the ADD operation fails when setting the dimensions 
to the actual dimensions of the ad graphic file.

Error message: 
*[AdError.UNSUPPORTED_DIMENSIONS @ operations[0].operand.ad.dimensions; 
trigger:'width=600, length=100']*

However, if you set the dimensions to half of what the actual image is, the 
ADD operation will succeed.

This seems like incorrect, or at the very least, counter-intuitive behavior 
of the API.

*Examples to reproduce.*

These examples will use a valid ad size of 600x100 that is valid when using 
the AdWords Web site, and also valid according to the double-sized HD ad 
sizes explanation in the attached screen shot of the AdWords Ad Size 
explanation screen.

<https://lh3.googleusercontent.com/-Fwt7aht_h4k/VsuOea4M18I/AAAAAAAAAIk/-zHLkufydBk/s1600/ad_sizes.png>


First, an example of the ADD operation failing. Here is the SOAP XML 
exchange when trying to add a 600x100 HD double-sized image.

[Feb 22 2016 21:54:44.000000 - ERROR] POST 
/api/adwords/cm/v201509/AdGroupAdService HTTP/1.1
Host: adwords.google.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.5.9-1ubuntu4.13, gzip
Accept-Encoding: gzip, deflate
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 21483
Authorization: (REDACTED)

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201509"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <SOAP-ENV:Header>
    <ns1:RequestHeader>
      <ns1:clientCustomerId>(REDACTED)</ns1:clientCustomerId>
      <ns1:developerToken>(REDACTED)</ns1:developerToken>
      <ns1:userAgent>(REDACTED)</ns1:userAgent>
    </ns1:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:mutate>
      <ns1:operations>
        <ns1:operator>ADD</ns1:operator>
        <ns1:operand>
          <ns1:adGroupId>10900819772</ns1:adGroupId>
          <ns1:ad xsi:type="ns1:TemplateAd">
            <ns1:displayUrl>play.google.com/store</ns1:displayUrl>
            <ns1:finalUrls>(REDACTED)</ns1:finalUrls>
            <ns1:trackingUrlTemplate>(REDACTED)</ns1:trackingUrlTemplate>
            <ns1:templateId>432</ns1:templateId>
            <ns1:templateElements>
              <ns1:uniqueName>adData</ns1:uniqueName>
              <ns1:fields>
                <ns1:name>appId</ns1:name>
                <ns1:type>TEXT</ns1:type>
                <ns1:fieldText>(REDACTED)</ns1:fieldText>
              </ns1:fields>
              <ns1:fields>
                <ns1:name>appStore</ns1:name>
                <ns1:type>ENUM</ns1:type>
                <ns1:fieldText>2</ns1:fieldText>
              </ns1:fields>
            </ns1:templateElements>
            <ns1:adAsImage>
              <ns1:type>IMAGE</ns1:type>
              <ns1:data>(REDACTED)</ns1:data>
            </ns1:adAsImage>
            <ns1:dimensions>
              <ns1:width>600</ns1:width>
              <ns1:height>100</ns1:height>
            </ns1:dimensions>
            <ns1:name>AdName1</ns1:name>
          </ns1:ad>
          <ns1:status>PAUSED</ns1:status>
        </ns1:operand>
      </ns1:operations>
    </ns1:mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Mon, 22 Feb 2016 21:54:42 GMT
Expires: Mon, 22 Feb 2016 21:54:42 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 538
Server: GSE

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201509";>
      <requestId>00052c62e15743b80abf9944b306dee4</requestId>
      <serviceName>AdGroupAdService</serviceName>
      <methodName>mutate</methodName>
      <operations>1</operations>
      <responseTime>178</responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>[AdError.UNSUPPORTED_DIMENSIONS @ 
operations[0].operand.ad.dimensions; trigger:'width=600, 
length=100']</faultstring>
      <detail>
        <ApiExceptionFault 
xmlns="https://adwords.google.com/api/adwords/cm/v201509";>
          <message>[AdError.UNSUPPORTED_DIMENSIONS @ 
operations[0].operand.ad.dimensions; trigger:'width=600, 
length=100']</message>
          
<ApplicationException.Type>ApiException</ApplicationException.Type>
          <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="AdError">
            <fieldPath>operations[0].operand.ad.dimensions</fieldPath>
            <trigger>width=600, length=100</trigger>
            <errorString>AdError.UNSUPPORTED_DIMENSIONS</errorString>
            <ApiError.Type>AdError</ApiError.Type>
            <reason>UNSUPPORTED_DIMENSIONS</reason>
          </errors>
        </ApiExceptionFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

Next, here is an example of the same ADD operation succeeding, but only by 
putting the incorrect resolution of 300x50 as the dimensions.
Interestingly, in the response, there are two different dimensions objects. 
One with the incorrect dimensions that was provided in the request, and one 
with the correct dimensions which is provided only in the response.

[Feb 22 2016 22:13:14.000000 - INFO] POST 
/api/adwords/cm/v201509/AdGroupAdService HTTP/1.1
Host: adwords.google.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.5.9-1ubuntu4.13, gzip
Accept-Encoding: gzip, deflate
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 21482
Authorization: (REDACTED)

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201509"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <SOAP-ENV:Header>
    <ns1:RequestHeader>
      <ns1:clientCustomerId>(REDACTED)</ns1:clientCustomerId>
      <ns1:developerToken>(REDACTED)</ns1:developerToken>
      <ns1:userAgent>(REDACTED)</ns1:userAgent>
    </ns1:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:mutate>
      <ns1:operations>
        <ns1:operator>ADD</ns1:operator>
        <ns1:operand>
          <ns1:adGroupId>10900822052</ns1:adGroupId>
          <ns1:ad xsi:type="ns1:TemplateAd">
            <ns1:displayUrl>play.google.com/store</ns1:displayUrl>
            <ns1:finalUrls>(REDACTED)</ns1:finalUrls>
            <ns1:trackingUrlTemplate>(REDACTED)</ns1:trackingUrlTemplate>
            <ns1:templateId>432</ns1:templateId>
            <ns1:templateElements>
              <ns1:uniqueName>adData</ns1:uniqueName>
              <ns1:fields>
                <ns1:name>appId</ns1:name>
                <ns1:type>TEXT</ns1:type>
                <ns1:fieldText>(REDACTED)</ns1:fieldText>
              </ns1:fields>
              <ns1:fields>
                <ns1:name>appStore</ns1:name>
                <ns1:type>ENUM</ns1:type>
                <ns1:fieldText>2</ns1:fieldText>
              </ns1:fields>
            </ns1:templateElements>
            <ns1:adAsImage>
              <ns1:type>IMAGE</ns1:type>
              <ns1:data>(REDACTED)</ns1:data>
            </ns1:adAsImage>
            <ns1:dimensions>
              <ns1:width>300</ns1:width>
              <ns1:height>50</ns1:height>
            </ns1:dimensions>
            <ns1:name>AdName2</ns1:name>
          </ns1:ad>
          <ns1:status>PAUSED</ns1:status>
        </ns1:operand>
      </ns1:operations>
    </ns1:mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Mon, 22 Feb 2016 22:13:12 GMT
Expires: Mon, 22 Feb 2016 22:13:12 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 953
Server: GSE

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <ResponseHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201509";>
      <requestId>00052c632373e6c00a4c58ccfc0b97bb</requestId>
      <serviceName>AdGroupAdService</serviceName>
      <methodName>mutate</methodName>
      <operations>1</operations>
      <responseTime>1100</responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <mutateResponse 
xmlns="https://adwords.google.com/api/adwords/cm/v201509";>
      <rval>
        <ListReturnValue.Type>AdGroupAdReturnValue</ListReturnValue.Type>
        <value>
          <adGroupId>10900822052</adGroupId>
          <ad xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="TemplateAd">
            <id>53166491372</id>
            <displayUrl>play.google.com/store</displayUrl>
            <finalUrls>(REDACTED)</finalUrls>
            <trackingUrlTemplate>(REDACTED)</trackingUrlTemplate>
            <Ad.Type>TemplateAd</Ad.Type>
            <templateId>432</templateId>
            <templateElements>
              <uniqueName>adData</uniqueName>
              <fields>
                <name>appId</name>
                <type>TEXT</type>
                <fieldText>(REDACTED)</fieldText>
              </fields>
              <fields>
                <name>appStore</name>
                <type>ENUM</type>
                <fieldText>2</fieldText>
              </fields>
            </templateElements>
            <adAsImage>
              <type>IMAGE</type>
              <referenceId>6391701967785164800</referenceId>
              <dimensions>
                <key>FULL</key>
                <value>
                  <width>600</width>
                  <height>100</height>
                </value>
              </dimensions>
              <urls>
                <key>FULL</key>
                <value>(REDACTED)</value>
              </urls>
              <mimeType>IMAGE_JPEG</mimeType>
              <Media.Type>Image</Media.Type>
            </adAsImage>
            <dimensions>
              <width>300</width>
              <height>50</height>
            </dimensions>
            <name>AdName2</name>
          </ad>
          <status>PAUSED</status>
          <approvalStatus>UNCHECKED</approvalStatus>
        </value>
      </rval>
    </mutateResponse>
  </soap:Body>
</soap:Envelope>

One wold think the expected behavior is to set the actual resolution of the 
graphic. Whether the graphic is considered half-sized or double-sized seems 
like an AdWords API implementation detail that the user should not be 
concerned with.

Can this be verified if this is the expected behavior of the API? Our 
expectations are to set dimensions to what the actual graphic is.

Thanks.
Mark


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/1c483c52-61c1-4912-a59e-5de09fab992a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to