<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 [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].
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/aaafa2c6-8993-4132-a77e-00b5095e235b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to