Adding negative criteria of type 'Platform' to a campaign returns unexpected error

56 views
Skip to first unread message

Ignacio Guillermo Martinez

unread,
Jan 9, 2020, 8:38:46 AM1/9/20
to AdWords API and Google Ads API Forum
Hello, I am trying to add segmentation to my program. For example, if I specify 'Tablet', I want it to exclude the ad for HighEndMobile, ConnectedTv and Desktop types.

For that, and knowing that I got the types of platforms from the example in Github called 'get_campaign_targeting_criteria', I added these as negative campaign criteria to my code. 
However, the SOAP response I get is the following:

Error summary: {'faultMessage': "[CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @ operations[10].operand.criterion; trigger:'PLATFORM', CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @ operations[11].operand.criterion; trigger:'PLATFORM', CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @ operations[12].operand.criterion; trigger:'PLATFORM']", 'requestId': '<hidden for security reasons>', 'serviceName': 'CampaignCriterionService', 'methodName': 'mutate', 'operations': '13', 'responseTime': '303'}
[2020-01-09 13:22:42,413] ERROR in app: Exception on /publish_ad [GET]
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/googleads/common.py", line 992, in MakeSoapRequest
    *packed_args, _soapheaders=soap_headers)['body']['rval']
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/zeep/proxy.py", line 45, in __call__
    kwargs,
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 130, in send
    return self.process_reply(client, operation_obj, response)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 195, in process_reply
    return self.process_error(doc, operation)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 299, in process_error
    detail=fault_node.find("detail"),
zeep.exceptions.Fault: [CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @ operations[10].operand.criterion; trigger:'PLATFORM', CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @ operations[11].operand.criterion; trigger:'PLATFORM', CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @ operations[12].operand.criterion; trigger:'PLATFORM']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/ubuntu/flask/private_server/server.py", line 146, in publish_ad
    gender_segmentation, device_segmentation)
  File "/home/ubuntu/googleadwords-python/code/add_campaign_targeting_criteria.py", line 418, in main
    result = campaign_criterion_service.mutate(operations)
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/googleads/common.py", line 1004, in MakeSoapRequest
    e.detail, errors=error_list, message=e.message)
googleads.errors.GoogleAdsServerFault: [CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @ operations[10].operand.criterion; trigger:'PLATFORM', CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @ operations[11].operand.criterion; trigger:'PLATFORM', CampaignCriterionError.CANNOT_EXCLUDE_CRITERIA_TYPE @ operations[12].operand.criterion; trigger:'PLATFORM']




Is it not possible anymore to target platforms through the API? 

Waiting anxiously for your response. As always, thank you.
Captura de pantalla 2020-01-09 a las 14.36.16.png

Google Ads API Forum Advisor Prod

unread,
Jan 9, 2020, 12:14:04 PM1/9/20
to 23c...@gmail.com, adwor...@googlegroups.com
Hi Ignacio,

Thank you for reaching out. As explained in this forum post, it is not possible to negatively target platforms at the campaign level since they are targeted by default. If you would like to exclude targeting platforms, you have to set their bidModifier to 0.0.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5001USvyFH:ref

Amandeep Walia

unread,
Nov 19, 2020, 9:24:30 AM11/19/20
to AdWords API and Google Ads API Forum
hello google team,

I tried to exclude device type "CONNECTED_TV" Its error say 'CANNOT_EXCLUDE_CRITERIA_TYPE'. Then I tried to set its bid_modifier to 0. But even that also not works, it gives error "OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE".
How can I can I exclude this type of criteria to stop my spending for specific device. Please help. 

Google Ads API Forum Advisor Prod

unread,
Nov 19, 2020, 11:07:29 PM11/19/20
to aman...@bridgingtech.com, adwor...@googlegroups.com
Hi Amandeep,

Thanks for posting your concern.

To further investigate, could you provide the following details via Reply privately to author option?
  • Customer ID
  • complete SOAP request and response logs with request ID

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5001USvyFH:ref
Reply all
Reply to author
Forward
0 new messages