googleads-php-lib icon indicating copy to clipboard operation
googleads-php-lib copied to clipboard

How do I update my keyword Text and MatchType?

Open yymawei opened this issue 7 years ago • 1 comments

I use googleads-php-lib and don't know how to update the Text and MatchType of the keywords. There will be no errors after the code is submitted, but the update will not take effect. `$operations = []; $adGroupId = '000000'; $criterionId = '0000000';

$adGroupCriterion = new BiddableAdGroupCriterion(); $adGroupCriterion->setAdGroupId($adGroupId);

$keyword = new Keyword(); $keyword->setId($criterionId); $keyword->setType(CriterionType::KEYWORD); $keyword->setText('Test Keyword'); $keyword->setMatchType(KeywordMatchType::PHRASE);

$adGroupCriterion->setCriterion($keyword);

$operation = new AdGroupCriterionOperation(); $operation->setOperand($adGroupCriterion); $operation->setOperator(Operator::SET); $operations[] = $operation;

$result = $adGroupCriterionService->mutate($operations);`

yymawei avatar Sep 20 '19 10:09 yymawei

This would be related to the usage of the API in general. Could you please post in this forum instead? Thanks.

fiboknacky avatar Sep 24 '19 10:09 fiboknacky