Hi,
Below is my implementation using the PHP client library.
$user = new AdWordsUser();
$user->SetClientCustomerId($_SESSION['adwordClientId']);
$adGroupId = 'INSERT_ADGROUP_ID';
$keywordCriterionId = 'INSERT_CRITERION_ID';
$adGroupCriterionService = $user->GetService('AdGroupCriterionService',
ADWORDS_VERSION);
$criterion = new Criterion();
$criterion->id = $keywordCriterionId;
$biddableAdgroupCriterion = new BiddableAdGroupCriterion();
$biddableAdgroupCriterion->adGroupId = $adGroupId;
$biddableAdgroupCriterion->criterion = $criterion;
$CPCbid = new CpcBid();
$CPCbid->bid = new Money(500000);
$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$biddingConfig = new Bids();
$biddingConfig->bids = $CPCbid;
$biddableAdgroupCriterion->biddingStrategyConfiguration = $biddingConfig;
// Create operation.
$operation = new AdGroupCriterionOperation();
$operation->operand = $biddableAdgroupCriterion;
$operation->operator = 'SET';
$operations = array($operation);
// Make the mutate request.
$result = $adGroupCriterionService->mutate($operations);
However I get the following errors
1. Undefined index: bids in
C:\xampp\htdocs\SEM\application\helpers\adwords\src\Google\Api\Ads\AdWords\v201309\AdGroupCriterionService.php
on line 1068
2. Fatal error: Cannot access empty property in
C:\xampp\htdocs\SEM\application\helpers\adwords\src\Google\Api\Ads\AdWords\v201309\AdGroupCriterionService.php
on line 1068
Can someone help me understand the errors. Thanks
On Tuesday, December 17, 2013 5:23:31 AM UTC-8, Anash P. Oommen (AdWords
API Team) wrote:
>
> Hi Jaison,
>
> You need to use AdGroupCriterionService. See
> https://code.google.com/p/google-api-adwords-dotnet/source/browse/examples/adwords/CSharp/v201309/BasicOperations/UpdateKeyword.csfor
> a C# example. Varta's approach works too, if you are using AdWords
> Scripts instead of AdWords API. If that's the case, you can use his script,
> or ask on https://groups.google.com/forum/#!forum/adwords-scripts.
>
> Cheers,
> Anash P. Oommen,
> AdWords API Advisor.
>
> On Monday, December 16, 2013 7:53:48 AM UTC-5, [email protected] wrote:
>>
>> Hi,
>>
>> Can someone give me a few pointers on how I can go about modifying a
>> specific keyword bid for a particular AdGroup.
>>
>> Thanks
>>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.