Closed GoogleCodeExporter closed 8 years ago
Hi Thomas,
Can you give me an example of the structure you're passing into the mutate
method on the AdGroupCriterionService?
Please remember to anonymise any personally identifiable information, such user
ids and passwords.
Regards,
- Paul, AdWords API Team.
Original comment by api.pmat...@gmail.com
on 15 May 2013 at 2:20
Hi Paul,
I build the structure with the following code:
define('ADWORDS_VERSION', 'v201302');
$adGroupCriterionService = $this->user->GetService('AdGroupCriterionService',
ADWORDS_VERSION, NULL, NULL, NULL, TRUE);
$keyword = new Keyword();
$keyword->text = $keywordLocalizer . ' ' . $objectType; //strings
$keyword->matchType = 'EXACT';
if ($isNegative) {
$adGroupCriterion = new NegativeAdGroupCriterion();
$criterionUse = 'NEGATIVE';
} else {
$adGroupCriterion = new BiddableAdGroupCriterion();
$criterionUse = 'BIDDABLE';
}
$adGroupCriterion->adGroupId = $adGroupId;
$adGroupCriterion->criterion = $keyword;
$operation = new AdGroupCriterionOperation();
$operation->operand = $adGroupCriterion;
$operation->operator = 'ADD';
$operations[] = $operation;
$result = $adGroupCriterionService->mutate($operations);
The error already occurs with an oparations array with a single field.
Regards
Thomas
Original comment by thomas2....@googlemail.com
on 15 May 2013 at 2:44
one addition:
the following code belonged to the affiliated adgroup
$bids = new ManualCPCAdGroupBids();
$bids->keywordMaxCpc = new Bid(new Money(10000));
$bids->keywordContentMaxCpc = new Bid(new Money(20000));
$adGroup->bids = $bids;
When I delete this snippet the above code works. But I think, the API should
have thrown an error or an exception at this point.
Original comment by thomas2....@googlemail.com
on 6 Jun 2013 at 12:22
Can you confirm that this problem still exists with version 4.5.0 or newer of
the AdWords API PHP Client Library?
Regards,
- Paul, AdWords API Team.
Original comment by api.pmat...@gmail.com
on 31 Jul 2013 at 4:28
With version 4.5.0 this error doesn't exist anymoure.
Regards
Thomas
Original comment by thomas2....@googlemail.com
on 31 Jul 2013 at 11:36
Thanks for clarifying this Thomas.
Regards,
- Paul, AdWords API Team.
Original comment by api.pmat...@gmail.com
on 5 Aug 2013 at 1:13
Original issue reported on code.google.com by
thomas2....@googlemail.com
on 15 May 2013 at 9:19