Hi, Starting with v201402, the *BUDGET_OPTIMIZER* scheme is no longer available. Please use the TARGET_SPEND <https://developers.google.com/adwords/api/docs/reference/v201402/BiddingStrategyService.TargetSpendBiddingScheme> scheme instead, as indicated in the v201402 Migration Guide <https://developers.google.com/adwords/api/docs/guides/migration/v201402>.
Note that the *TARGET_SPEND* scheme is a shared bidding type, so you will need to use the BiddingStrategyService <https://developers.google.com/adwords/api/docs/reference/v201406/BiddingStrategyService> to create the strategy before you use it with your campaigns. See our Bidding guide <https://developers.google.com/adwords/api/docs/guides/bidding#strategy-types> for more information. Thanks, Josh, AdWords API Team On Friday, July 25, 2014 3:37:50 PM UTC-4, Baptiste Pernet Mugnier wrote: > > Hello. > > I am trying to create a campaign with these settings for the bidding > strategy: > Focus on *clicks* - use maximum CPC bids > AdWords will set my bids to help maximize clicks within my target budget > > In the example, I only see MANUAL_CPC. I tried with BUDGET_OPTIMIZER, but > I get this error: > > CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN > > Here is my code: > > // Get the campaign service > $campaignService = $user->GetService('CampaignService', > self::ADWORDS_VERSION); > > // Create the campaign object. > $campaign = new Campaign(); > $campaign->name = $data['name']; > > // Link to the previously created budget. > $campaign->budget = new Budget(); > $campaign->budget->budgetId = $budget->budgetId; > > // Set bidding strategy. > $campaign->biddingStrategyConfiguration = new > BiddingStrategyConfiguration(); > $campaign->biddingStrategyConfiguration->biddingStrategyType = > 'BUDGET_OPTIMIZER'; > > // Optimize the serving of the ad > $campaign->adServingOptimizationStatus = 'OPTIMIZE'; > > // Set keyword matching setting. > $keywordMatchSetting = new KeywordMatchSetting(); > $keywordMatchSetting->optIn = TRUE; > $campaign->settings[] = $keywordMatchSetting; > > // Set the channel type > $campaign->advertisingChannelType = 'DISPLAY'; > > // Call the service. > $result = $campaignService->mutate(array( > new CampaignOperation($campaign, 'ADD') > )); > > // Return the campaign. > return $result->value[0]; > > Do you have any help to offer ? > Thank you very much. > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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]. For more options, visit https://groups.google.com/d/optout.
