Advertisement
A_GUES

Code Ads

Jul 11th, 2023
857
0
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function main() {
  2.   var KEYWORDS_TO_PAUSE = ['example keyword 1', 'example keyword 2'];
  3.  
  4.   var iterator = AdsApp.keywords()
  5.     .withCondition('CampaignStatus = ENABLED')
  6.     .withCondition('AdGroupStatus = ENABLED')
  7.     .withCondition('Status = ENABLED')
  8.     .get();
  9.  
  10.   while (iterator.hasNext()) {
  11.     var keyword = iterator.next();
  12.     if (KEYWORDS_TO_PAUSE.indexOf(keyword.getText()) > -1) {
  13.       keyword.pause();
  14.     }
  15.   }
  16. }
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement