contentBidTypeCriterionGroup doesn't mutate

21 views
Skip to first unread message

Ершов Александр

unread,
Jun 1, 2016, 8:50:38 AM6/1/16
to AdWords API Forum
Hello!

I need to turn on custom bids for placements.

I'm trying to mutate Adgroup. setting contentBidTypeCriterionGroup to 'PLACEMENT'
as it is recommended here
https://groups.google.com/forum/#!topic/adwords-api/W1Kl2fmKbqI

Here is my code

    $adGroupId = '...adgroup code...';
    $adGroupService = $user->GetService('AdGroupService', ADWORDS_VERSION);

    $operations = array();
   
    $adGroup = new AdGroup();
    $adGroup->id = $adGroupId;
    
    $adGroup->contentBidTypeCriterionGroup = 'PLACEMENT';        
    $operation = new AdGroupOperation();
    $operation->operand = $adGroup;
    $operation->operator = 'SET';
    $operations[] = $operation;
    $result = $adGroupService->mutate($operations);

And when i run this code, param doesn't change.
It simply doesn't send this change in SOAP request.

API v201603

What am I doing wrong?

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
      <requestId>....</requestId>
      <serviceName>AdGroupService</serviceName>
      <methodName>mutate</methodName>
      <operations>1</operations>
      <responseTime>70</responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
      <rval>
        <ListReturnValue.Type>AdGroupReturnValue</ListReturnValue.Type>
        <value>
          <id>30649754764</id>
          <campaignId>603388708</campaignId>
          <campaignName>Russia - CPM Test v1.10</campaignName>
          <name>hotweb.bid 200x200</name>
          <status>ENABLED</status>
          <settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TargetingSetting">
            <Setting.Type>TargetingSetting</Setting.Type>
            <details>
              <criterionTypeGroup>PLACEMENT</criterionTypeGroup>
              <targetAll>true</targetAll>
            </details>
          </settings>
          <biddingStrategyConfiguration>
            <biddingStrategyType>MANUAL_CPM</biddingStrategyType>
            <biddingStrategySource>CAMPAIGN</biddingStrategySource>
            <biddingScheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ManualCpmBiddingScheme">
              <BiddingScheme.Type>ManualCpmBiddingScheme</BiddingScheme.Type>
            </biddingScheme>
            <bids xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CpcBid">
              <Bids.Type>CpcBid</Bids.Type>
              <bid>
                <ComparableValue.Type>Money</ComparableValue.Type>
                <microAmount>10000</microAmount>
              </bid>
              <cpcBidSource>ADGROUP</cpcBidSource>
            </bids>
            <bids xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CpmBid">
              <Bids.Type>CpmBid</Bids.Type>
              <bid>
                <ComparableValue.Type>Money</ComparableValue.Type>
                <microAmount>15000000</microAmount>
              </bid>
              <cpmBidSource>ADGROUP</cpmBidSource>
            </bids>
          </biddingStrategyConfiguration>
        </value>
      </rval>
    </mutateResponse>
  </soap:Body>
</soap:Envelope>

Shwetha Vastrad (AdWords API Team)

unread,
Jun 1, 2016, 3:17:53 PM6/1/16
to AdWords API Forum
Hi,

I see that you found the error in the code and resolved it. Please let us know if you have any other questions. 

Regards,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages