May 302013

Some reports available in the web frontend of Google Adwords cannot be downloaded using the Adwords API. Specifically, the report with the billing summary of the clients of a MCM account, including the total budget, the total spent and the total remaining. This information allows the automation of a monitoring system to generate an alert when the remaining budget falls below a given amount.

This post explains how to automate the login process and the download of that report, using a perl script.

Continue reading »

 Posted by at 6:36 am
Jun 022012

(leer este artículo en español)

In a previous post we explained how to develop perl scripts for the automated management of Google AdWords campaings, making use of a perl library that implements the API to access AdWords. During the execution of these scripts, errors of different kinds may happen: network timeouts, rejected parameter values, etc. This post will show how to catch and react to these errors.

The Adwords API Perl library employs the CPAN module SOAP::WSDL to establish the communication between the client and the server (SOAP stands for “Simple Object Access Protocol”, and WSDL stands for “Web Services Description Language”)

In a perl script that works with Adwords campaigns using the Adwords API Perl library, the modifications to be done are performed by issuing calls to the ‘mutate’ method of the service to be accessed (AdgroupService, AdgroupAdService,etc…).

Continue reading »

 Posted by at 8:00 pm
May 082012

(leer este artículo en español)

In this post we will explain how to use in Perl the v201109 version of the Google Adwords API. We make the assumption that the reader is already using a Google Adwords account, and that there are already in the account some adwords campaigns created, with some adgroups in them.

We start by downloading the library from Google’s website:

When we access the above url in a browser, we find that the last available release of the library is in a file named awapi_perl_lib_2_5_6.tar.gz.

Once downloaded and uncompressed, we can try the sample perl script to retrieve the campaign identifiers:

In line three we write the location where we have put the library. In following lines, we include the library modules we are going to use.

Next comes the definition of the ‘get_campaigns()’ function, that we’ll review later, and finally the main program where we establish a connection to AdWords and call ‘get_campaigns()’.

 Posted by at 6:44 pm