Hi, updating an adgroup CPC is completed smoothly, however I am having
problems printing the value.
In PHP, my code is: (Please see $newstatus = $adGroup->keywordMaxCpc;)
// Adjust bid to micro format
$agcpcG = ($cpc * 1000000);
// Create ad group bid.
$adGroupBids = new ManualCPCAdGroupBids();
$adGroupBids->keywordMaxCpc = new Bid(new Money($agcpcG));
$adGroup->bids = $adGroupBids;
// Create operations.
$operation = new AdGroupOperation();
$operation->operand = $adGroup;
$operation->operator = 'SET';
$operations = array($operation);
// Update ad group.
$result = $adGroupService->mutate($operations);
// Display status
if (isset($result->value)) {
foreach ($result->value as $adGroup) {
$newstatus = $adGroup->keywordMaxCpc;
}
}
else {
$newstatus = "Error";
}
Many thanks.
--
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en.