Hi Sany,

It sounds like you're trying to solve two problems. I've broken down the 
answer into parts.

*Part 1: Find the keyword by adnetworktype2.*

Information regarding targeting based on *Google Search *or *Search 
partners* is based on the NetworkSetting 
<https://developers.google.com/adwords/api/docs/reference/v201502/CampaignService.NetworkSetting>
 in 
the Campaign 
<https://developers.google.com/adwords/api/docs/reference/v201502/CampaignService.Campaign#networkSetting>.
 
If you want to set that field, it would be through the CampaignService 
<https://developers.google.com/adwords/api/docs/reference/v201502/CampaignService>.
 
I don't know of a simple way of retrieving keywords by *adnetworktype2 *(also 
known in the API as *networkSetting*). You would need to get the campaigns 
associated with the *AdGroupCriterion *in order to get the value of 
networkSetting 
<https://developers.google.com/adwords/api/docs/reference/v201502/CampaignService.Campaign#networkSetting>
.  

*Part 2: Set the max CPC bid for a keyword.*

When setting information on your *AdGroupCriterion*, you will also want to 
set a CpcBid 
<https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupCriterionService.CpcBid>.
 
Setting the bid 
<https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupCriterionService.CpcBid#bid>
 on 
the *CpcBid* will adjust the maximum CPC bid. Check out the PHP example on 
Adding 
Keywords 
<https://github.com/googleads/googleads-php-lib/blob/df2725441e139950311b11eda8db564af6e4cfac/examples/AdWords/v201502/BasicOperations/AddKeywords.php>
 where 
we show how to create a BiddingStrategyConfiguration 
<https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupCriterionService.BiddingStrategyConfiguration>
 that 
contains the *CpcBid*.  

Cheers,
Nadine, AdWords API Team

On Friday, May 29, 2015 at 11:55:50 PM UTC-4, Sany Ahmed wrote:
>
>
> <https://lh3.googleusercontent.com/-Jmg7jtPkKuA/VWkz_3LJK2I/AAAAAAAAATc/T_qapLqWrL0/s1600/problem2.png>
> Hi Josh,
>
> As you told me to make new post. this is it.
>
> When i downloaded keyword report two keyword with (same id + same 
> keyword_text) are withing same adgroup  but different adnetworktype2. then 
> the problem is when i am trying to set Max CPC for individual keywords with 
> different values , i am in a fix how to select my individual keywords . i 
> have attached a png here with field names
>
> Please help me out as you help me previously.i am looking for you helpful 
> suggestion. Thanks in advance.
>
> Or advice/provide some example code to add keyword Max. CPC bid for 
> experiment.
>
> KEYWORD FIND
> =============
>  //Find keyword to set experimental Max CPC
>  $keyword = new Keyword($value['keyword_text'], 
> $value['keyword_match_type'], $value['id']);  // here no way to specify ad 
> network type2 like google search or search partner
>
>
> TOTAL CODE
> ==========
>
> function AddExperimentAndSetBidMultiplier(AdWordsUser $user, $campaignId, 
> $adGroupId) {
>    
>  // Get the services, which loads the required classes.
>     $experimentService = $user->GetService('ExperimentService', 
> ADWORDS_VERSION);
>     $adGroupService = $user->GetService('AdGroupService', ADWORDS_VERSION);
>     $adGroupCriterionService = 
> $user->GetService('AdGroupCriterionService', ADWORDS_VERSION);
>
>     // Create experiment.
>     $experiment = new Experiment();
>     $experiment->campaignId = $campaignId;
>     $experiment->name = 'experiment bid mulitplier for individual keyword;
>     $experiment->queryPercentage = 50;
>
>     // Set additional settings (optional).
>     $experiment->startDateTime = date('Ymd His', strtotime('+1 day'));
>     $experiment->endDateTime = date('Ymd His', strtotime('+1 month'));
>
>     // Create operation.
>     $experimentOperation = new ExperimentOperation();
>     $experimentOperation->operand = $experiment;
>     $experimentOperation->operator = 'ADD';
>
>     $experimentOperations = array($experimentOperation);
>
>     // Make the mutate request.
>     $result = $experimentService->mutate($experimentOperations);
>
>     // Display result.
>     $experiment = $result->value[0];
>     printf ("Experiment with name '%s' and ID '%.0f' was added.\n", 
> $experiment->name, $experiment->id);
>
>
>         // Create ad group bid multipliers to be used in the experiment.
>             $adGroupBidMultipliers = new 
> ManualCPCAdGroupCriterionExperimentBidMultiplier();
>             $adGroupBidMultipliers->maxCpcMultiplier = new 
> BidMultiplier($value['experiment_bid_multiplier']); //values from my 
> database
>
>
>         // Create experiment data for a new experiment-only keyword.
>             $adGroupCriterionExperimentData =new 
> BiddableAdGroupCriterionExperimentData();
>             $adGroupCriterionExperimentData->experimentId =  
> $experiment->id;                 //experiment i have created on my campaign 
> now
>
>             $adGroupCriterionExperimentData->experimentDeltaStatus = 
> 'MODIFIED';
>             
> $adGroupCriterionExperimentData->experimentBidMultiplier=$adGroupBidMultipliers;
>
>         //Find KEYWORD to SET Max. CPC
>             $keyword = new Keyword($value['keyword_text'], 
> $value['keyword_match_type'], $value['id']);  //values from my database to 
> find keyword
>
>
>         // Create ad group criterion.
>             $adGroupCriterion = new BiddableAdGroupCriterion();
>             $adGroupCriterion->adGroupId = $value['adgroup_id'];   
> //values from my database
>
>             $adGroupCriterion->criterion = $keyword;
>
>             $adGroupCriterion->experimentData = 
> $adGroupCriterionExperimentData;
>
>
>         // Create operation.
>             $adGroupCriterionOperation = new AdGroupCriterionOperation();
>             $adGroupCriterionOperation->operand = $adGroupCriterion;
>             $adGroupCriterionOperation->operator = 
> 'ADD';                     //Here i need to SET or ADD operator at the time 
> of adding experimental Max CPC?
>
>
>             $adGroupCriterionOperations = 
> array($adGroupCriterionOperation);
>
>         // Make the mutate request.
>             $result = 
> $adGroupCriterionService->mutate($adGroupCriterionOperations);
>
>         // Display result.
>            $adGroup = $result->value[0];
>            printf ("Ad group with name '%s' and ID '%.0f' was updated in 
> the ".experiment.\n", $adGroup->name, $adGroup->id);
>
> }
>
> Thanks,
>
> Sany
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ade5af85-af89-4b3e-bdf7-abeae8f4139c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to