A Publisher's Guide to Contextual PPC Ad Optimization

Optimizing Rectangle Placement

For the purpose of this article I will consider rectangles any of the following: square (250x250); medium rectangle (300x250); large rectangle (336x280); small rectangle (180x150).

Rectangles are some of the best performing ad units because of the way they can be easily integrated into most types of content. I have talked before of putting banners, such as 428x60 banners, into your content, but a box usually trumps banner performance.

The most common application for a box is sandwiched between paragraphs of content. This is accomplished by placing the ad in a div as in the following:

<div style = "float: right;">adcode</div>

This will place the ad within your content but allow the content to flow around it to the left. You can place this before the first paragraph, but that is not the best method because the content will only flow around it on the left and the bottom, not on the top. It is better to place it after the first or second paragraph. The problem is that in most content management systems pages, and not paragraphs, are stored in the database. So you will need to parse your own content to insert the ad code.

// where $article is... erm... your article
$arr = explode("</p>", $article);
$arr[1] = "your add code here".$arr[1];
$article = implode("</p>", $arr);
echo $article;

The above PHP code will add your adcode after the first paragraph of your content, assuming your content is formatted using standard

tags. If you wish it to be after your content you simply change the bolded numeral to 2, or 3, or whatever you want. Thanks to KelliShaver in the forums for that code snippet.

The best method though requires a little planning. Depending on images or other on page elements you might not always want your adcode after the same paragraph with every article. So if you can plan in advance you can place a marker, such as <adlocation>, in your article at the location where you want the ad. Then after pulling your article from the database you simply do a replacement on that marker as below:

$adcode = 'adcode here';
$pagetext = str_replace("<adlocation>", $adcode, $pagetext);
echo $pagetext;

This way you can put the ad code after the first paragraph, second paragraph, third paragraph, wherever it needs to be depending on the article format. Or, you can leave it off if the article is too short or you do not want it to get in the way.

Another prime placement for your box ads is in your menu. I mentioned when speaking of optimizing leaderboards how having your site as a whole, or merely a page element, being the same width as an ad can drastically help optimization. Well in this case if your menu is the same width as a rectangle ad (so 180, 250, 300, or 336 pixels) you can place a box ad either at the top, bottom, or middle of your menu and visitors will read it, and click on it, while viewing your menu. If you have ad units to spare you can also include Google's smaller half banner unit which is 236x60 as part of your menu. This type of integration is extremely effective and it is worthwhile to consider when designing your site.

In this image you will see an example of a rectangle ad the same width as the menu placed at the menu bottom. Such a placement also works in the middle or the top of a menu.