I cannot set selective_optimization to create campaign.

372 views
Skip to first unread message

Tohihiro Ogata

unread,
Oct 30, 2021, 4:03:30 PM10/30/21
to AdWords API and Google Ads API Forum
I cannot set selective_optimization to create campaign.

In the WEB UI, it seems that it has been changed to specify the category instead of the conversion action, but in the API, the resource name of the conversion action is specified.

If you specify the resource name of the conversion action, it will be "he error code is not in this version.".

Below is the run-time debug log.
(ID & CPC is masked.)

Outgoing request: Headers: {"developer-token":"REDACTED","login-customer-id":"XXXXX","x-goog-api-client":"gl-ruby/3.0.2 gax/0.6.0 gapic/14.0.0 grpc/1.41.0","x-goog-request-params":"customer_id=XXXXX"} Payload: {"customerId":"XXXXX","operations":[{"create":{"name":"CampaignName","status":"PAUSED","advertisingChannelType":"DISPLAY","networkSettings":{"targetGoogleSearch":false,"targetSearchNetwork":false,"targetContentNetwork":true,"targetPartnerSearchNetwork":false},"geoTargetTypeSetting":{"positiveGeoTargetType":"PRESENCE_OR_INTEREST","negativeGeoTargetType":"PRESENCE"},"campaignBudget":"customers/XXXXX/campaignBudgets/XXXXX","startDate":"2021-11-10","endDate":"2021-11-31","selectiveOptimization":{"conversionActions":["customers/XXXXX/conversionActions/XXXXX"]},"paymentMode":"CLICKS","targetSpend":{"cpcBidCeilingMicros":"xxxxxxxxxxx"}}}],"partialFailure":true}
Incoming response: Payload: {"partialFailureError":{"code":3,"message":"The error code is not in this version., at operations[0].create.selective_optimization.conversion_actions","details":[{"@type":"type.googleapis.com/google.ads.googleads.v8.errors.GoogleAdsFailure","errors":[{"errorCode":{"requestError":"UNKNOWN"},"message":"The error code is not in this version.","trigger":{"stringValue":""},"location":{"fieldPathElements":[{"fieldName":"operations","index":0},{"fieldName":"create"},{"fieldName":"selective_optimization"},{"fieldName":"conversion_actions"}]}}]}]},"results":[{}]}
Partial failure errors: {"errors":[{"errorCode":{"requestError":"UNKNOWN"},"message":"The error code is not in this version.","trigger":{"stringValue":""},"location":{"fieldPathElements":[{"fieldName":"operations","index":0},{"fieldName":"create"},{"fieldName":"selective_optimization"},{"fieldName":"conversion_actions"}]}}]}


Google Ads API Forum Advisor

unread,
Nov 2, 2021, 1:51:03 AM11/2/21
to og...@atara.co.jp, adwor...@googlegroups.com

Hi Tohihiro,

 

I'm Kevin from the Google Ads API Team. I'll try my best to assist you.

 

Can you please provide a sample screenshot which shows the UI's expected values for the selectiveOptimization field as well as the complete request and response logs with request ID with unredacted IDs so I can better investigate the issue? You can send these to me via Reply privately to author option. If this option is not available, please send it to googleadsa...@google.com instead.

 

Regards,

Google Logo
Kevin Gil Soriano
Google Ads API Team
 


ref:_00D1U1174p._5004Q2QGfbf:ref

Tomerpop

unread,
Nov 2, 2021, 5:10:41 AM11/2/21
to AdWords API and Google Ads API Forum
Same Here, Please let us know when you find a solution 

Google Ads API Forum Advisor

unread,
Nov 2, 2021, 11:05:15 AM11/2/21
to og...@atara.co.jp, adwor...@googlegroups.com
Hi Tohihiro,

Thank you for sending the log and screenshot privately, I raised this with my team and we will be getting back to you as soon as possible.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2QGfbf:ref

Google Ads API Forum Advisor

unread,
Nov 2, 2021, 11:09:00 AM11/2/21
to tome...@gmail.com, adwor...@googlegroups.com
Hi Tomerpop,

Thank you for chiming in. To ensure that your issue is taken care of, could you privately send us a full request and response log of communication with the API in which you attempt to create a campaign with selective optimization of a conversion action in MCC account leads to this error? 

The request and response appears similar to the JSON Mappings in our REST documentation. Our client libraries have loggers with logging instructions, to see these instructions you can click on the client library you use in the sidebar of our client library guide and click on "Logging". Setting the logger to 'DEBUG' will get the desired log.

If this isn't your exact error, could you open a new thread so we can address your unique issue exlusively?

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2QGfbf:ref

Tomerpop

unread,
Nov 3, 2021, 2:50:55 AM11/3/21
to AdWords API and Google Ads API Forum
Hi Aryeh, 
Sent, please let me know if you need any more data from my end.
Thanks

Tomerpop

unread,
Nov 4, 2021, 7:58:38 AM11/4/21
to AdWords API and Google Ads API Forum
Hi Guys, 
Any update regarding this issue?
Thanks


On Tuesday, 2 November 2021 at 17:09:00 UTC+2 adsapi wrote:

Google Ads API Forum Advisor

unread,
Nov 4, 2021, 10:51:12 AM11/4/21
to tome...@gmail.com, adwor...@googlegroups.com
Greetings!

Selective optimization was only supposed to be used for App campaigns. We hadn't documented that it could be used with Search and Display campaigns. There was an update to the code base that caught these unexpected requests, which is the errors you're seeing. It wasn't supposed to be working in the first place. For the few developers who were using this feature, I'm seeing if it's possible to turn it on.

If you feel you need to set conversion goals for Display campaigns immediately, then there is another option. As of November 3, there is now a way to set it for a campaign. We just released v9 of the Google Ads API (https://ads-developers.googleblog.com/2021/11/announcing-v9-of-google-ads-api.html). In the release, there is a concept called Conversion Goals (https://developers.google.com/google-ads/api/docs/conversions/goals/overview) where you can set custom goals for your campaign. You would need to upgrade to this version to use the feature.

Best,
 
Google Logo
Nadine Wang
Google Ads API Team
 
Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 

ref:_00D1U1174p._5004Q2QGfbf:ref

Google Ads API Forum Advisor

unread,
Nov 17, 2021, 1:48:12 PM11/17/21
to adwor...@googlegroups.com
Hi,

Please see the update I just posted to the other thread:

https://groups.google.com/g/adwords-api/c/v__tYGz6bIA/m/9bSzRFI2AgAJ

Best regards,
Josh, Google Ads API Team

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