I've created a very simple script that I want to review all keywords and raise their bids to first page bids if they are below first page bids. The issue that I'm running into is that the script changes more than that - it changed a number of Low Quality Score bids also. I'm just concerned that there's something wrong with this script.
function main() {
var keywords=AdWordsApp
.keywords()
.withCondition("Status = ENABLED")
.withCondition("AdGroupStatus = ENABLED")
.forDateRange("LAST_7_DAYS")
.get();
while(keywords.hasNext())
{
var keyword=keywords.next();
var bid=keyword.getMaxCpc();
var firstPage=keyword.getFirstPageCpc();
if(bid<firstPage && keyword.getCampaign().isEnabled()) {
Logger.log("The bid for "+keyword.getText()+" will be raised from "+bid+" to "+firstPage);
keyword.setMaxCpc(firstPage);
}
}
}