Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save derekmartinla/8ac05c8ecfd55fd4091e32dd9d0dc74c to your computer and use it in GitHub Desktop.
Save derekmartinla/8ac05c8ecfd55fd4091e32dd9d0dc74c to your computer and use it in GitHub Desktop.
function main() {
var kwIter = AdWordsApp.keywords().withCondition("Text CONTAINS '2016'").get();
while (kwIter.hasNext()) {
var keyword = kwIter.next();
// create new keyword
keyword.getAdGroup().newKeywordBuilder()
.withText(keyword.getText().replace("2016", "2017"))
.withCpc(keyword.bidding().getCpc())
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment