【问题标题】:How do I get the current CPC bid for a keyword in Google AdWords API?如何在 Google AdWords API 中获取关键字的当前 CPC 出价?
【发布时间】:2015-06-18 23:52:52
【问题描述】:

如何获取帐户中某个关键字的当前出价?我试过了

$adGroupCriterion->biddingStrategyConfiguration->bids[0]->bid->value * AdWordsConstants::MICROS_PER_DOLLAR;

但它给了我一个错误'Trying to get property of non-object'。当我添加关键字时,我能够在返回值 OK 中获得出价。

在 GET 操作中似乎无法选择出价。我已经搜索了所有文档。

https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupCriterionService.BiddableAdGroupCriterion#biddingStrategyConfiguration

https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupCriterionService.Bids

虽然在响应中返回了该字段,但在输入时会被忽略且无法选择。

我正在使用这个例子来获取关键字:

https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201502/BasicOperations/GetKeywords.php#L43

【问题讨论】:

    标签: php google-ads-api


    【解决方案1】:

    我找到了。

    https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupCriterionService.CpcBid#bid

    $selector->fields = array('Id', 'KeywordText', 'KeywordMatchType', 'AdGroupId', 'Status', 'CpcBid');
    

    而且我的属性和操作符有误:

    $adGroupCriterion->biddingStrategyConfiguration->bids[0]->bid->microAmount / AdWordsConstants::MICROS_PER_DOLLAR;
    

    很抱歉打扰您。

    【讨论】:

      猜你喜欢
      • 2014-06-18
      • 1970-01-01
      • 1970-01-01
      • 2016-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多