SEM Development

December 13, 2005

Making web service APIs behave the same

Filed under: Tips & Tricks — Bob @ 5:18 pm

YSM and Google’s account management APIs look incredibly different but do, essentially, the same thing. That is, allow you to manage your SEM campaigns through a web service. Ask Jeeves has a sponsored listings product with an API for larger advertisers and MSN will soon be releasing it sponsored search product. So, how are you going to keep a similar programming interface across all of these products? I’ll tell you how I’m doing it.

Essentially, these web services boil down to a CRUD (Create, Retrieve, Update, Destroy) service for your search advertising campaigns. So, why not create a class that does all of these things for each part of a campaign?

Firstly, I want to express the way of handling CRUD that is the most intuitive to me. I use four methods in all of my classes. There are:

new() or new(ID):
Instantiates an empty object or tries to instantiate a populated object if an ID is supplied. Dies if the ID does not exist.

exists(ID):
Instantiates an object with the ID supplied or returns false.

remove():
Deletes the object.

save():
Creates the object if none exists yet or updates it if it already exists.

For Google, I’ve written 5 classes:

  • Account
  • Campaign
  • AdGroup
  • Creative
  • Keyword

For YSM, there are only 3 classes:

  • Account
  • Category
  • Listing

This allows for code that looks kind of like this (in Perl, by the way):

#Get the ad group
my @ags = Google::AdGroup->getAll;
my $ag = pop @ags;


#Make the keyword
my $kw = new Google::Keyword;
$kw->maxCpc(40000); #microns, remember
$kw->text('somethin');
$kw->destinationUrl('http://www.example.com');


#Save the keyword in the ad group
$ag->addKeyword($kw);

More intuitive, don’t you think?

December 2, 2005

Changes to the TrafficEstimatorService

Filed under: Google AdWords, annoyances — Bob @ 6:08 pm

Google’s TrafficEstimatorService has been a joke for a while now. In theory, it’s a great idea. Put in a keyword, get back the estimated impressions, clicks, and even an estimated average rank. The problem lies in the way Google ranks ads. Here’s an explanation right from the horse’s mouth:

Your keyword-targeted ad is ranked on search results and content pages based on its maximum cost-per-click (CPC) - or maximum cost-per-impression (CPM) for site-targeted ads - and Quality Score. Having relevant ad text, a high CPC (or for site-targeted ads, a high CPM), and a strong CTR will result in a higher position for your ad. Because this ranking system uses well-targeted, relevant ads to help determine your ad’s position, your ad can’t be locked out of the top position based solely on price.

Since your rank, and the number of times your ad is shown, is based on your ad text there’s a large area of doubt when Google tries to estimate the number of impressions you’re going to get with a completely new keyword. This and the lackluster display of accuracy so far, I’m assuming, is why they’ve changed it. Here’s the lowdown (or if you prefer to read the whole thread):

Gone:

  • impressions - The estimated number of impressions for a given
    keyword
  • ctr - The estimated click-through-rate for a given keyword.
  • notShownPerDay - The estimated number of times that the ad would not be shown, despite a keyword match

Added:

  • clicksPerDay - The estimated number of clicks generated
    per day for a keyword in a given ad group

I have to say, if this makes the system more accurate, I like this change. It keeps the main reason I use the estimation service intact, that is, to forecast the amount of money it’ll take to traffic a new keyword (or a few million). What it doesn’t do is try to estimate the relevancy of a keyword before it’s added to the campaign. That’s fine with me. I like to determine the relevance of a keyword by the amount of money it’s profiting, not by its CTR.

I’ll get back to you on whether the new system is actually more accurate …