Unable to enable Set a maximum cost per click bid limit and set bid max using google adwords api
I have created google adCampaigns, adGroups, Keywords, Ads, Locations using Google Adwords API but I am not able to set "Set a maximum cost per click bid limit" using api
I have used this code to set but it's not getting set
$operations = []; // Create ad group with the specified ID. $groupId = $adGroup->getId(); $adGroupNew = new AdGroup(); $adGroupNew->setId($groupId); $cpcBidMicroAmount = intval($_GET['cpc']) * 1000000; // Update the CPC bid if specified. if (!is_null($cpcBidMicroAmount)) { $bid = new CpcBid(); $money = new Money(); $money->setMicroAmount($cpcBidMicroAmount); $bid->setBid($money); $biddingStrategyConfiguration = new BiddingStrategyConfiguration(); $biddingStrategyConfiguration->setBids([$bid]); $adGroup->setBiddingStrategyConfiguration($biddingStrategyConfiguration); } // Create ad group operation and add it to the list. $operation = new AdGroupOperation(); $operation->setOperand($adGroupNew); $operation->setOperator(Operator::SET); $operations[] = $operation; // Update the ad group on the server. $adGroupService->mutate($operations);
Do this at Campaign Level to set Bid Max Limit