RE: PageOnePromotedBiddingScheme

2019-09-17 Thread Google Ads API Forum Advisor Prod
Hi Mélanie,

Thank you for reaching out to our team.

Could you try something similar to the one below, as seen in the (highlighted) 
PHP version of the Add Campaigns example :

// Set bidding strategy (required).
$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$biddingStrategyConfiguration->setBiddingStrategyType( 
BiddingStrategyType::MANUAL_CPC );

and change yours to : $biddingStrategy->setType( 
BiddingStrategyType::PAGE_ONE_PROMOTED )

Should the issue persist, and since this appears to be more of a PHP client 
library implementation concern, you may reach out to the PHP client library 
owners via this link as they are better equipped to assist you regarding this 
matter.

I hope this helps.

Best regards,
Peter
Google Ads API Team
ref:_00D1U1174p._5001UHH8Fz:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/uOJgl0PY0CMW00y1wp1oZQQKCRe28rkZw-uQ%40sfdc.net.


PageOnePromotedBiddingScheme

2019-09-17 Thread Mélanie Macias
Hi,
I'm getting the ERROR --> [RequestError.UNSUPPORTED_TYPE_IS_USED @ 
operations[0].operand.type; trigger:'PAGE_ONE_PROMOTED']
This is my PHP code for creating a campaing with PageOnePromotedBidding

private static function createBiddingStrategy(
AdWordsServices $adWordsServices,
AdWordsSession $session
) {
$biddingStrategyService = $adWordsServices->get($session, 
BiddingStrategyService::class);

// Create a portfolio bidding strategy.
$biddingStrategy = new SharedBiddingStrategy();
$biddingStrategy->setName("Maximize Clicks " . uniqid());
$biddingStrategy->setType(PAGE_ONE_PROMOTED);
    

$biddingScheme = new PageOnePromotedBiddingScheme();
// Optionally set additional bidding scheme parameters.
$bidCeiling = new Money();
$bidCeiling->setMicroAmount(200);
$biddingScheme->setBidCeiling($bidCeiling);


$biddingScheme->setStrategyGoal(PageOnePromotedBiddingSchemeStrategyGoal::PAGE_ONE_PROMOTED);
$biddingScheme->setBidModifier(1);

$biddingStrategy->setBiddingScheme($biddingScheme);

// Create the bidding strategy operation.
$operation = new BiddingStrategyOperation();
$operation->setOperator(Operator::ADD);
$operation->setOperand($biddingStrategy);

$result = $biddingStrategyService->mutate([$operation]);
$newBiddingStrategy = $result->getValue()[0];
printf(
"Portfolio bidding strategy with name '%s' and ID %d of 
type %s was created.\n",
$newBiddingStrategy->getName(),
$newBiddingStrategy->getId(),
$newBiddingStrategy->getType()
);

return $newBiddingStrategy;
}

Can somebody help me???

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d505b560-fa2f-4807-973a-6f79153bd6f7%40googlegroups.com.