CampaignCriterion creation with bid modifier getting FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING

42 views
Skip to first unread message

Will Schymik

unread,
Dec 3, 2021, 2:30:08 PM12/3/21
to AdWords API and Google Ads API Forum
Hello,

I am trying to create a CampaignCriterion with a bid modifier. My request is as follows:

Method: /google.ads.googleads.v7.services.CampaignCriterionService/MutateCampaignCriteria

Host: googleads.googleapis.com

Headers: {

  "developer-token": "REDACTED",

  "login-customer-id": "REDACTED",

  "x-goog-api-client": "REDACTED",

  "x-goog-request-params": "customer_id=REDACTED"

}

Request: customer_id: "REDACTED"

operations {

  create {

    income_range {

      type_: INCOME_RANGE_90_UP

    }

    campaign: "customers/REDACTED/campaigns/REDACTED"

    bid_modifier: 3.0

    negative: false

  }

}


Even though negative is set to false the response that I get is the following:

error_code {

    criterion_error: FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING

  }

  message: "The field is not allowed to be set when the negative field is set to true, e.g. we don\'t allow bids in negative ad group or campaign criteria."

  location {

    field_path_elements {

      field_name: "operations"

      index: 0

    }

    field_path_elements {

      field_name: "create"

    }

    field_path_elements {

      field_name: "income_range"

    }

  }


Negative clearly seems to be getting set to false. Not sure what the issue is here. Any help would be greatly appreciated.

Thanks,
Will

Google Ads API Forum Advisor

unread,
Dec 6, 2021, 1:31:14 PM12/6/21
to will.s...@apartmentadvisor.com, adwor...@googlegroups.com

Hello Will,

Thank you for posting your concern. It appears that the behavior of the API request is as expected and let me explain why.

Please note that if the ‘negative’ field is set as ‘false’, we are creating positive / standard keywords. Refer to the KeywordsInfo section in the Campaign Criteria documentation, which states you can only exclude keywords at the campaign level.

Thus, the API request call worked and created a negative keyword when the negative field was set to ‘TRUE’ and you received an error when the negative field was set to ‘FALSE’. The field is not allowed to be set when the negative field is set to true, e.g. we don't allow bids in negative Adgroup or campaign.

Regards,

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey

Google Logo
Jakeia Sabrina
Google Ads API Team
 

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