I have a question about CampaignService SelectiveOptimization.

31 views
Skip to first unread message

hy hwang

unread,
Oct 21, 2020, 9:30:05 PM10/21/20
to AdWords API and Google Ads API Forum
I have a question about SelectiveOptimization.
I coded as below and communicated with API, but there was an error.

$campaignService = $adWordsServices->get($session, CampaignService:::class);
$operations = [];
$campaign = new Campaign();
$campaign->setId ($campaignId);

for($i=0;$i<count($rows->selectiveOptimizationCheck);$i++){
     $selectiveOptimizationCheck[$i] = $rows->selectiveOptimizationCheck[$i];
}
$selectiveOptimization = new SelectiveOptimization();
$selectiveOptimization->setConversionTypeIds ($selectiveOptimizationCheck);
$selectiveOptimization->setConversionTypeIdsOps(null);
$campaign->setSelectiveOptimization ($selectiveOptimization);

$operation = new CampaignOperation();
$operation->setOperand ($campaign);
$operator->setOperator;
$operations[] = $operation;
$result = $campaignService->mute ($operations);

I want you to tell me how to solve it.

Google Ads API Forum Advisor Prod

unread,
Oct 22, 2020, 12:14:38 PM10/22/20
to style...@gmail.com, adwor...@googlegroups.com
Hello,

What was the error you were facing for this API call?

Thanks,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q26BDXv:ref

harrison

unread,
Oct 22, 2020, 10:29:31 PM10/22/20
to AdWords API and Google Ads API Forum
Hi, Anthony!!

As you can see from the attached file, the error code won't return. Can you give me an answer for my coding?  
2020년 10월 23일 금요일 오전 1시 14분 38초 UTC+9에 adsapiforumadvisor님이 작성:
4442234.png

Google Ads API Forum Advisor Prod

unread,
Oct 23, 2020, 10:21:29 AM10/23/20
to style...@gmail.com, adwor...@googlegroups.com
Hello,

Are you using our client libraries? If so, you can try to enable logging as shown here and share the request and response.
Reply all
Reply to author
Forward
0 new messages