Pause and unpause campaigns

255 views
Skip to first unread message

smiss

unread,
Aug 9, 2012, 11:26:17 AM8/9/12
to adwords...@googlegroups.com
Hello,

I have some large accounts with a lot of campaigns here. I am looking for a script that does the easy task to pause all my campaigns temporary. At the time I want to activate everything again another script could do this job as well. But in case some campaigns were already paused, the script should "save" this information. At the time of turning everything on again the previously paused campaigns should stay paused.

I was thinking about a solution that first adds a label to all the paused campaigns. The second script that turns everything on could ignore the labled campaigns.

But is it possible to set lables with Adwords scripts at all? Or is there an easier way to make this work?

Thanks for your help
smiss

Kevin Winter

unread,
Aug 13, 2012, 10:12:09 AM8/13/12
to adwords...@googlegroups.com
Hi smiss,
  Unfortunately, it's not currently possible to use labels with AdWords Scripts.  There are other ways of achieving your goal.  For example, you could create a spreadsheet that two scripts can load by url.  When the first script runs, it can write a row for each Campaign that was already paused and the second script can read this spreadsheet to know which campaigns to leave paused.

Note that currently, scripts cannot be scheduled, so you would have to manually go in and pause and unpause via these scripts (which may suit your purposes).  There's a Campaign setting in the UI under Advanced Settings that lets you customize exactly when a given campaign runs.  This may be a better fit if you have a predictable period in which you don't want your campaigns to serve.

- Kevin Winter
AdWords Scripts Team

Lapchien

unread,
Jan 21, 2013, 4:00:55 PM1/21/13
to adwords...@googlegroups.com
This is exactly what we require, and I understand that scripts can now be scheduled.  Is there any script available to simply pause / start all campaigns?

Kevin Winter (AdWords Scripts Team)

unread,
Jan 23, 2013, 9:12:46 AM1/23/13
to adwords...@googlegroups.com
Hi,
  Not only can scripts be scheduled now, but it is also now possible to use Labels.

If you just wanted to pause all campaigns, this should do the trick:

var campaigns = AdWordsApp.campaigns().get();
while (campaigns.hasNext()) {
  campaigns
.next().pause();
}

- Kevin Winter
AdWords Scripts Team
Reply all
Reply to author
Forward
0 new messages