Skip to content

if you want the code find it yourself in the repository

For those of you who have large adwords accounts, I just finished the beginnings of a management tool to make it easier to control exactly what and where things go.

The general launch point of this program is the batch file awapi.bat.
That file handles the mechanics of loading all the necessary classes;
the Java language is very verbose, so the batch file hides this away
from you the user.

The general syntax is as follows:
awapi.bat enable|disable [[region=...] [state=...] [adgroup=...] [account=...]]

Thus, in order to disable all campaigns except Florida’s, you’d
run the program twice:
awapi.bat disable region=east
awapi.bat enable state=florida

In order to just turn off “flowers in”, you’d just specify that.
awapi.bat disable adgroup=”flowers in”
Note the use of quotes around the adgroup, as there is a space in the
name. Similarly, to reenable “flowers in” in New York:
awapi.bat enable adgroup=”flowers in” state=”new york”

To disable absolutely everything:
awapi.bat disable

To enable California and New Hampshire simultaneously:
awapi.bat enable state=california state=”new hampshire”

To turn off florists in central:
awapi.bat disable adgroup=”florists” region=”central”

To enable everything for the fs-dev account:
awapi.bat enable account=fs-dev

A few more notes on the syntax:
Capitalization does not matter
The order of the specifier arguments does not matter
It is an error not to include at least one argument
It is an error if the first argument is not “enable” or “disable”
Any argument which contains spaces must be joined by quote marks to
unify it.

The .bat file is just there so that you don’t have to type the seven .jars into the classpath each time. Everything else is in java. The examples basically follow the use cases I was given at the start of the problem, but I think it’s fair to say that the syntax is pretty easy to pick up.

RSS feed


No comments yet.

Sorry, the comment form is closed at this time.