Hello,
I just wanted to add some clarity to Sarah's question.
We are building a system that automatically creates experiments and updates experimental bid multipliers for keywords.
If the experiment is successful the system applies the experiments, otherwise it deletes the experiments and starts all over again.
The problem that we are having right now is when we are applying experimental bid multiplier to a keyword, its cpc_bid changes to the default value.
The event sequence is following:
1. set default bid for an adgroup
2. create a keyword in the adgroup
3. change the keyword's cpc_bid from the default to a custom value
4. create an experiment for the campaign
5. apply experimental bid multiplier to the keyword
on the step 5 keyword's cpc_bid changes from the custom back to the default value
here is the code snippet of setting experimental bid multiplier:
// Create ad group bid multipliers to be used in the experiment.
$adGroupBidMultipliers = new ManualCPCAdGroupCriterionExperimentBidMultiplier();
$adGroupBidMultipliers->maxCpcMultiplier = new BidMultiplier(2.5); //we set bid multiplier here
// Create experiment data for a new experiment-only keyword.
$adGroupCriterionExperimentData =new BiddableAdGroupCriterionExperimentData();
$adGroupCriterionExperimentData->experimentId = $experimentId;
$adGroupCriterionExperimentData->experimentDeltaStatus = 'MODIFIED';
$adGroupCriterionExperimentData->experimentBidMultiplier=$adGroupBidMultipliers;
// Find Keyword.
$keyword = new Keyword('vacation', 'BROAD', 10030320); // keyword_text, match_type, keyword_id
// Create ad group criterion.
$adGroupCriterion = new BiddableAdGroupCriterion();
$adGroupCriterion->adGroupId = 54545454; //adgroup_id
$adGroupCriterion->criterion = $keyword;
$adGroupCriterion->experimentData = $adGroupCriterionExperimentData;
// Create operation.
$adGroupCriterionOperation = new AdGroupCriterionOperation();
$adGroupCriterionOperation->operand = $adGroupCriterion;
$adGroupCriterionOperation->operator = 'ADD';
$adGroupCriterionOperations = array($adGroupCriterionOperation);
// Make the mutate request.
$result = $adGroupCriterionService->mutate($adGroupCriterionOperations);