Tuesday, January 16, 2007

Google Target Ads – De-"coded"

To all the Google aspirants, some good news! Here is the “inside scoop” on how Google targets its ads. Well. What the heck? Here is the actual code or at least the code that I think very closely mimicks the one sitting inside the Google servers:

string returnAdText(Page currWebPage)
{
string arrPrice[] = {“Low prices on”, “Cheap”, “Free”};

/*Note: Capital casing conforms to the output*/
string arrQuality[] = {“High quality”, “Quality”, “Good quality”};

/*Warning: Extremely "geeky" code to find the context of the text in the page*/
objContext = getContext(currWebPage);

return (arrPrice[random()%3] + arrQuality[random()%3] + objContext.toString());
}

Of course, as granma has always taught you, leaving a piece of code untested is considered a cardinal sin across cultures. So here is the output (Taken from ibnlive):




Didn’t think it’d be this easy. Duh! Does anyone own Google shares here?

1 comment:

Chiranth Channappa said...

wow!

that's definitely not what IBN live wants its viewers to be reading!