AdGroupCriterionService不是't更改关键字文本

AdGroupCriterionService isn't changing keyword text

本文关键字:关键字 文本 不是 AdGroupCriterionService      更新时间:2023-09-26

我一直在使用这个节点模块:https://www.npmjs.com/package/googleads-node-lib并且已经能够使用它更改跟踪模板和CpcBid小额金额,但无法弄清楚为什么它不更改关键字文本。以下相关代码:

var budget = new service.Model(attributes);
// Change Keyword text (doesn't work)
budget.attributes.criterion.text = 'superawesomekeyword';
// Also tried this line below but it doesn't work either.
budget.set('criterion', {'attributes': {'xsi:type': 'Keyword'},
                                        'id': 175369767649,
                                        'type': 'KEYWORD',
                                        'Criterion.Type': 'Keyword',
                                        'text': 'superawesomekeyword', 
                                        'matchType': 'EXACT'})    
// Change CPC Bid <---- This works
budget.attributes.biddingStrategyConfiguration.bids[0].bid.microAmount = 80000000;
// Change Tracking Template URL <---- This also works
budget.set('trackingUrlTemplate', 'http://test.com');
service.mutateSet(process.env.GOOGLE_CLIENT_CUSTOMER_ID, budget, function(err, results) {
     if (err) {
         console.log(err);
     }
     else { 
          console.log(JSON.stringify(results, null, 2));
     }
}

控制台输出显示跟踪模板和microAmount已更改,但关键字文本未更改。控制台输出

创建新关键字,而不是尝试更改它,如果关键字创建成功,则删除旧关键字。