Changing Network Settings in Draft

24 views
Skip to first unread message

Nick R.

unread,
Dec 20, 2017, 3:21:46 PM12/20/17
to AdWords API Forum
Hi - I'm working off one of the code examples (https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/v201710/campaign_management/add_draft.py ) and would like to modify the new draft by toggling search partners network off.  I noticed in documentation that Network isn't a possible criteria to target - is there a workaround to this? Thanks!

Vincent Racaza (AdWords API Team)

unread,
Dec 20, 2017, 11:45:32 PM12/20/17
to AdWords API Forum
Hi Nick,

Could you confirm on why you were able to say that "Network isn't a possible criteria to target"? Network is not a criterion, therefore, you really could not update it in the CampaignCriterion object. You can only update the network setting of a draft campaign in the Campaign object. See sample SOAP request snippets below on creating a draft campaign (via DraftService.mutate()) and modifying its network setting (via CampaignService.mutate()):

<soapenv:Body>
   
<mutate xmlns="https://adwords.google.com/api/adwords/cm/v201710">
       
<operations>
           
<operator>ADD</operator>
           
<operand>
               
<baseCampaignId>XXXXXXXXXX</baseCampaignId>
               
<draftName>Test Draft Sample</draftName>
           
</operand>
       
</operations>
   
</mutate>
</soapenv:Body>

<soapenv:Body>
 
<mutate xmlns="https://adwords.google.com/api/adwords/cm/v201710">
   
<operations>
       
<operator>SET</operator>
       
<operand>
           
<id>XXXXXXXXXXXX</id> //This is the draft campaign ID
           
<networkSetting>
               
<targetGoogleSearch>true</targetGoogleSearch>
               
<targetSearchNetwork>true</targetSearchNetwork>

           
</networkSetting>
       
</operand>
   
</operations>
 
</mutate>
</soapenv:Body>

You can emulate the SOAP requests above and let me know if this works on your end.

Thanks,
Vincent
AdWords API Team

Nick R.

unread,
Jan 17, 2018, 12:48:57 PM1/17/18
to AdWords API Forum
Thanks Vincent - you're totally right. I misunderstood NetworkSetting for being a criterion rather than a field in Campaign objects.  Thanks for your response!
Reply all
Reply to author
Forward
0 new messages