Ignore keywords with bid changes in the last 7 days

43 views
Skip to first unread message

Doug

unread,
Mar 10, 2016, 1:53:26 PM3/10/16
to AdWords Scripts Forum
What are some good options for preventing adwords scripts to make bid changes to keywords that already had a recent bid change?

So if I have a script that bids up keywords 10% with 0 impressions last 30 days under a certain CPC threshold that runs daily, I want it to apply the bid changes to keywords that havent had a bid change in the last 7 days. Otherwise, it will continue to bid up the same low impression keywords 10% every day until the CPC threshold is reached. How can I tell it to ignore the keywords that already received a bid update in the last 7 days?

Tyler Sidell (AdWords Scripts Team)

unread,
Mar 10, 2016, 3:27:30 PM3/10/16
to AdWords Scripts Forum
Hi Doug,

Perhaps you should try using labels for your keywords.  When you initially run the script to apply bids you keywords you can apply a label:
function main() {
 
var kw = AdWordsApp.keywords.withCondition("AdGroupStatus = ENABLED").get();
 
 
while(kw.hasNext()){
   
var activeKw = kw.next();
    activeKw
.applyLabel('LabelName');
 
}
}

Then when you run this additional script to change keyword bids, you can run a filter that searches for keywords that does not contain the label established above:
var kw = AdWordsApp.keywords.withCondition("AdGroupStatus = ENABLED").withCondition("LabelNames CONTAINS_NONE ['LabelName']").get();

Thanks,
Tyler Sidell
AdWords Scripts Team

Doug

unread,
Mar 10, 2016, 5:59:41 PM3/10/16
to AdWords Scripts Forum
That would be a fine suggestion if we werent limited to 200 labels in our account. I would assign a new label every day the scripts run and create a new label to assign the changed keywords to with that day's date in it.

But in 6 months we would be out of labels. And I hope there is a cleaner solution than constantly creating/deleting labels for temporary use.

Are there any other options? If not, can you give me the code for doing the following:

create a label called Bid Increase:031016
assign label to a keyword (activeKw.applyLabel('Bid Increase:031016')
reorder labels alphabetically ("Volume:Low Volume;Bid Increase:031016" becomes "Bid Increase:031016;Volume:Low Volume") - the reason for this is so that when we Data>Text to Columns in Excel, the columns line up for each label

when script runs on a date like 4/03/16:
only get keywords with Bid Increase labels where date is older than 7 days from todays date (03/27/16)
change Bid Update label from "Bid Update:032716" to "Bid Update:040316"

This is all fairly complicated so I was hoping there would be a condition like withCondition("LastBidChange > Last_7_DAYS")

Please let me know if you have any other ideas for a better way to accomplish this.

Thanks for your help.

Tyler Sidell (AdWords Scripts Team)

unread,
Mar 11, 2016, 9:48:44 AM3/11/16
to AdWords Scripts Forum
Hi Doug,

Currently we do not have a simple solution to use a withCondition filter such as LastBidChange.  The best course of option would be to add labels with the date and then when you run the script, you could also remove the previous labels thus you won't reach your labels limit.  I'll let the team know about the LastBidChange option to see the possibility of adding such a feature.  We will keep you posted.

Thanks,
Tyler Sidell
AdWords Scripts Team

Reply all
Reply to author
Forward
0 new messages