Now My code view like this:

            $campaign = new Campaign();
                . . .



  $biddingStrategyService = $user->GetService('BiddingStrategyService', 
ADWORDS_VERSION);


            $biddingStrategyConfiguration = new SharedBiddingStrategy();
  $biddingStrategyConfiguration->name = "AutoCPC " . uniqid();
            $biddingScheme = new EnhancedCpcBiddingScheme();
            $biddingStrategyConfiguration->biddingScheme = $biddingScheme;
            $biddingStrategyConfiguration->status = "ENABLED";
            $biddingStrategyConfiguration->type = 'ENHANCED_CPC';
            
            $campaign->biddingStrategyConfiguration = 
$biddingStrategyConfiguration;

            
                 .  .  .




And still not work :/
I've got error:

An error has occurred: 
> [BiddingErrors.INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE @ 
> operations[0].operand.biddingStrategyConfiguration.biddingStrategyType; 
> trigger:'ENHANCED_CPC']
>



W dniu wtorek, 27 września 2016 10:18:23 UTC+2 użytkownik Joyce Lava 
napisał:
>
> Hi,
>
> You may refer in this example code 
> <https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201607/AdvancedOperations/UsePortfolioBiddingStrategy.php>
>  (PHP 
> client library example) to see how to create the SharedBiddingStrategy and 
> set its id as the BiddingStrategyConfiguration.biddingStrategyId. The 
> example code uses TargetSpendBiddingScheme (which also valid as a portfolio 
> strategy, highlighted in this line 
> <https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201607/AdvancedOperations/UsePortfolioBiddingStrategy.php#L65>).
>  
> You may replace the TargetSpendBiddingScheme into EnhancedCpcBiddingScheme 
> <https://developers.google.com/adwords/api/docs/reference/v201607/BiddingStrategyService.EnhancedCpcBiddingScheme>
>  from 
> the example code to use ENHANCED_CPC. Hope this helps.
>
> Thanks,
> Joyce, AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3f36c39d-24b8-4b32-936d-35464df00f80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to