Last active
November 20, 2015 11:13
-
-
Save russorat/296d0f3a16f1520c9aba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********** | |
* Helper function to create the labels in the account | |
* that will be used to keep track of Keywords in limbo. | |
***********/ | |
function createLabelsIfNeeded(days_in_limbo) { | |
for(var i = 1; i<=days_in_limbo; i++) { | |
var label_name = 'Deleting in '+i+' days'; | |
if(!AdWordsApp.labels().withCondition("Name = '"+label_name+"'").get().hasNext()) { | |
AdWordsApp.createLabel(label_name, | |
'These entities will be deleted in '+i+ | |
' days. Created by an AdWords Script.'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment