【问题标题】:How do I decrease mobile bid criteria for campaigns for Google AdWords API?如何降低 Google AdWords API 广告系列的移动出价标准?
【发布时间】:2015-07-28 00:47:15
【问题描述】:

当我将平台出价标准设置为 0 时,它给了我一个错误:

异常 'SoapFault' 带有消息 '[OperatorError.OPERATOR_NOT_SUPPORTED @ operations[2].operand.criterion;触发器:'CriterionId{id=30001}']'

// Mobile criterion ID.
$mobileCriterionId = 30001;
$platform = new Platform();
$platform->id = $mobileCriterionId;

$operations = array();
foreach ([$location, $language, $platform] as $criterion) {
  // create criteria
  $campaignCriterion = new CampaignCriterion();
  $campaignCriterion->campaignId = $campaign->id;
  $campaignCriterion->criterion = $criterion;

  if ($criterion == $platform) 
    $campaignCriterion->bidModifier = 0;

  // create operations to perform
  $operation = new CampaignCriterionOperation();
  $operation->operand = $campaignCriterion;
  $operation->operator = 'ADD';
  $operations[] = $operation;
}

// carry out the operations
$result = $campaignCriterionService->mutate($operations);    

平台:https://developers.google.com/adwords/api/docs/appendix/platforms

标准使用矩阵:https://developers.google.com/adwords/api/docs/guides/criteria-usage

示例(针对广告组):https://developers.google.com/adwords/api/docs/guides/adgroup-bid-modifiers#update

活动标准:https://developers.google.com/adwords/api/docs/reference/v201502/CampaignCriterionService.CampaignCriterion

版本:v201502,测试帐号

【问题讨论】:

    标签: php google-ads-api


    【解决方案1】:

    我不得不使用“SET”而不是“ADD”操作,但仅适用于平台。很明显吧?

      if ($criterion == $platform)
        $operation->operator = 'SET'; # all platforms automatically added to new campaigns. cannot re-ad. must set. 
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多