*As per below note from addCampaign page - 
https://developers.google.com/adwords/api/docs/reference/latest/CampaignService.NetworkSetting
Note:* Setting targetContentContextual for new campaigns or existing 
campaigns that have enabled Flexible Reach (
TargetRestrictSetting.useAdGroup=true) will fail with 
TargetError.CANNOT_MODIFY_CONTENT_CONTEXTUAL.

As per the above note, I'm setting useAdGroup to false. But still the API 
complains about networkSettings. I thought useAdgroup with false value 
would respect network settings.

    <soapenv:Body>
        <mutate xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns="https://adwords.google.com/api/adwords/cm/v201206";>
            <operations>
                <operator>ADD</operator>
                <operand>
                    <name>Test Campaign_2012/09/27-06:04:12</name>
                    <status>ACTIVE</status>
                    <startDate>20120927</startDate>
                    <endDate>20120927</endDate>
                    <budget>
                        <period>DAILY</period>
                        <amount>
                            <microAmount>50000</microAmount>
                        </amount>
                        <deliveryMethod>ACCELERATED</deliveryMethod>
                    </budget>
                    <biddingStrategy xsi:type="ns2:ManualCPC"
                                     
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201206"/>
                    <settings xsi:type="ns3:KeywordMatchSetting"
                              
xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201206";>
                        <optIn>true</optIn>
                    </settings>
                    <settings xsi:type="ns4:TargetRestrictSetting"
                              
xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201206";>
                        *<useAdGroup>false</useAdGroup>*
                    </settings>
                    <networkSetting>
                        <targetGoogleSearch>true</targetGoogleSearch>
                        <targetSearchNetwork>true</targetSearchNetwork>
                        <targetContentNetwork>false</targetContentNetwork>
                        
<targetContentContextual>false</targetContentContextual>
                        
<targetPartnerSearchNetwork>false</targetPartnerSearchNetwork>
                    </networkSetting>
                </operand>
            </operations>
        </mutate>
    </soapenv:Body>

Please let me know the problem here.

On Friday, September 7, 2012 2:59:19 PM UTC-7, ben fenster wrote:
>
> i dont understand why using this setting is not allowed and i cant see 
> nothing about it in the API docs ?
> how can i avoid such mistakes if the API does not explain what is 
> allowed/not allowed ?
>
>
> On Friday, September 7, 2012 2:40:57 PM UTC+3, Anash P. Oommen wrote:
>>
>> Hi Ben,
>>
>> You shouldn't set setTargetContentContextual on NetworkSetting field if 
>> you are using v201206, instead use TargetRestrictSetting on campaign. Then 
>> define the TargetingSetting in your adgroup.
>>
>> See 
>> http://code.google.com/p/google-api-ads-java/source/browse/examples/adwords_axis/src/main/java/adwords/axis/v201206/basicoperations/AddCampaigns.java
>>  and 
>> http://code.google.com/p/google-api-ads-java/source/browse/examples/adwords_axis/src/main/java/adwords/axis/v201206/basicoperations/AddAdGroups.java
>>  for 
>> details on how this may be done.
>>
>> Cheers,
>> Anash P. Oommen,
>> AdWords API Advisor.
>>
>> On Thursday, 6 September 2012 19:17:31 UTC+5:30, ben fenster wrote:
>>>
>>>  Hi,
>>>
>>> i am currntly using the latest java client API on the latest version of 
>>> the adwords api (v201206).
>>> i try to add a campaign after calling the setTargetContentContextual of 
>>> the NetworkSetting Object and always get the following API ERROR
>>> [com.google.api.adwords.v201206.cm.TargetError , TargetError , 
>>> TargetError.CANNOT_MODIFY_CONTENT_CONTEXTUAL , 
>>> operations[0].operand.networkSetting ]
>>>
>>> i also tried playing with the TargetRestrictSetting as mentioned in the 
>>> API Docs with no success. 
>>> can any one tell me why is that ?
>>>
>>>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to