javascript [adw-提高廉价转换关键字的出价] #adwords_scripts

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript [adw-提高廉价转换关键字的出价] #adwords_scripts相关的知识,希望对你有一定的参考价值。

function main() {
  //For keywords with less than $5 CPC, let's pump those bids up by 35%
  var AMAZING_COST_PER_CONV = 5;
  var AMAZING_BID_INCREASE_AMOUNT = .35;
  
  //For keywords with between $5 and $8 CPCs, we will only increase the bids by 20%
  var GREAT_COST_PER_CONV = 8;
  var GREAT_BID_INCREASE_AMOUNT = .20;
  
  var kw_iter = AdWordsApp.keywords()
    .withCondition("Status = ENABLED")
    .get();
  
  while(kw_iter.hasNext()) {
    var kw = kw_iter.next();
    var kw_stats = kw.getStatsFor("LAST_30_DAYS");
    var cost = kw_stats.getCost();
    var conversions = kw_stats.getConversions();
    if(conversions > 0) {
      var cost_per_conversion = (cost/(conversions*1.0));
      
      if(cost_per_conversion <= AMAZING_COST_PER_CONV) {
        kw.setMaxCpc(kw.getMaxCpc() * (1+AMAZING_BID_INCREASE_AMOUNT));
      }
      else if(cost_per_conversion <= GREAT_COST_PER_CONV) {
        kw.setMaxCpc(kw.getMaxCpc() * (1+GREAT_BID_INCREASE_AMOUNT));
      }
    }else{
      //no conversions on this keyword
      //we will deal with that later
      continue;
    }
  }
}

以上是关于javascript [adw-提高廉价转换关键字的出价] #adwords_scripts的主要内容,如果未能解决你的问题,请参考以下文章

javascript [adw-动态调整广告系列预算] #adwords_scripts

javascript [零展示的adw-alert] #adwords_scripts

javascript [adw-account每月预算暂停] #adwords_scripts

javascript [adw-account performance report] #adwords_scripts

javascript [adw-search query performance report] #adwords_scripts

javascript [adw-Account Anomaly Detector - Single Account] #adwords_scripts