RE: Got INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE when setting target CPA for search campaigns

275 views
Skip to first unread message
Message has been deleted

Google Ads API Forum Advisor

unread,
Oct 4, 2021, 1:36:02 AM10/4/21
to zhe...@leadplus.co.jp, adwor...@googlegroups.com
Hi Zhe,

Thank you for reaching out to our API support team and for sharing your logs. However, you may refrain from sending your entire logs and code in forum posts.

Once requested by our team, you may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

That said, I deleted your initial post and code, and reposting the information with further details redacted, retaining only specific parts of your post and logs  :

Good day,
 
My team are using Google Ads API v8 and we have a set of unit test cases that run from time to time to check if we are using API in the right way.
 
From today, we noticed a test case started failing. It is about setting the TARGET_CPA bidding strategy to a Search campaign ( which was created with MANUAL_CPC). The last time the case has passed was 2 days ago.
Wonder if any changes in the API in these 2 days and what actions I should take to make it work.
 
Request and response details and the code

Request
 
Request: customer_id: "PLEASE LET ME KNOW IF YOU NEED THIS INFORMATION"
operations {
  update {
    resource_name: "customers/PLEASE LET ME KNOW IF YOU NEED THIS INFORMATION/campaigns/14825758506"
    bidding_strategy_type: TARGET_CPA
    target_cpa {
      target_cpa_micros: 10000000
      cpc_bid_ceiling_micros: 100000000
      cpc_bid_floor_micros: 10000000
    }
  }
  update_mask {
    paths: "resource_name"
    paths: "bidding_strategy_type"
    paths: "target_cpa.target_cpa_micros"
    paths: "target_cpa.cpc_bid_ceiling_micros"
    paths: "target_cpa.cpc_bid_floor_micros"
  }
}

Response
-------
Fault: errors {
  error_code {
    bidding_error: INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE
  }
  message: "Bidding strategy is not supported or cannot be used as anonymous."
  trigger {
    string_value: "TARGET_CPA"
  }
  location {
    field_path_elements {
      field_name: "operations"
      index: 0
    }
    field_path_elements {
      field_name: "update"
    }
    field_path_elements {
      field_name: "target_cpa"
    }
  }
}
request_id: "REDACTED"
 
( Note since it is in our test case, the request was sent to the sandbox environment )

Moving forward, using the TARGET_CPA would require that your account meet the eligibility requirements as mentioned in this guide and in this article here. Also, could you confirm what strategy type was initially set for the 14825758506 campaign, before you opted to perform a request to update it to TARGET_CPA?

For our team to take a closer look, could you share the customer ID and complete logs with all the details to our team privately? I asked because I am unable to locate the said 14825758506 campaign and the account where it belongs to, from our end. 

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2OVlFD:ref

Thanajiranaj Pattanasakpinyo

unread,
Oct 6, 2021, 2:12:07 PM10/6/21
to AdWords API and Google Ads API Forum
I got the same error, last month it's can be changed but for this month it failed.
What's the change on Google side?

Google Ads API Forum Advisor

unread,
Oct 7, 2021, 4:41:20 AM10/7/21
to thanaji...@gmail.com, adwor...@googlegroups.com
Hi Thanajiranaj,

Thank you for commenting of this forum post. I can see that you've created another private email thread for this concern. Let us continue our discussion there as we will ask further information to investigate the issue.

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


ref:_00D1U1174p._5004Q2OVlFD:ref

Julien Stoeffler

unread,
Oct 10, 2021, 7:25:48 PM10/10/21
to AdWords API and Google Ads API Forum
Hi, I got the a very similar same issue: trying to change bidding strategy from "Maximize Conversions" to "Target CPA" fails with:

 {"errors":[{"error_code":{"bidding_error":"INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE"},"message":"Bidding strategy is not supported or cannot be used as anonymous.","trigger":{"string_value":"TARGET_CPA"},"location":{"field_path_elements":[{"field_name":"operations","index":0},{"field_name":"update"},{"field_name":"target_cpa"}]}}],"request_id":"[REDACTED]"}

It used to work a week ago.

Google Ads API Forum Advisor

unread,
Oct 11, 2021, 12:59:20 PM10/11/21
to jul...@unixal.com, adwor...@googlegroups.com
Hi Julien,

At the bottom of the page of Bidding Strategy Types it points out that a portfolio-only bidding scheme in the context of a standard strategy generates the error. The valid context of a TargetCPA bidding strategy type is only portfolio based and not campaign based.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2OVlFD:ref

Thanajiranaj Pattanasakpinyo

unread,
Oct 12, 2021, 2:55:14 AM10/12/21
to AdWords API and Google Ads API Forum
I found the solution to fix this, you can change the code following below
current code (C#)
campaign.TargetCpa = new TargetCpa
                    {
                        TargetCpaMicros = Convert.ToInt64(bidValue * 1_000_000)
                    };
new code (C#)
campaign.MaximizeConversions = new MaximizeConversions
                    {
                        TargetCpa = Convert.ToInt64(bidValue * 1_000_000)
                    };

Julien Stoeffler

unread,
Oct 12, 2021, 12:03:41 PM10/12/21
to AdWords API and Google Ads API Forum
Hi Everyone,

Thanks for the pointers, it seems that we're experiencing this issue because of this update.

Starting on September 30, 2021, Google Ads API developers won’t be able to create new TargetCpa or TargetRoas standard bidding strategies in Search campaigns. This change will prevent creating new Search campaigns that use these strategies, as well as prevent updating existing Search campaigns to use these strategies. Instead, use the new optional target CPA field with MaximizeConversions, and the new target ROAS field with MaximizeConversionValue. This change will not affect portfolio (shared) bidding strategies.

Best,

Julien

Google Ads API Forum Advisor

unread,
Oct 13, 2021, 12:51:36 PM10/13/21
to jul...@unixal.com, adwor...@googlegroups.com

Hi Julien,

Thank you for bringing this up, Updates to how Google Ads API Smart Bidding strategies are organized is the correct blog post to reference.

Regards,

Reply all
Reply to author
Forward
0 new messages