By phpwatcher
via phptoys.com
Published: Apr 23 2007 / 13:22
In this tutorial I will show you how to create a simple AD rotator script without using database. The script can display both text and image ads and you can control the number of ads to be displayed at once.
Comments
pcx99 replied ago:
Ad banners can be deceptively complex beasts. Generally, if you're using adsense you don't need a rotator but once you get a taste of commission based sales (IE, not adsense) rotating banners becomes -- attractive.
This is a good start but there's a lot more to banners if you want to do them right. Best practice says you should keep fresh-content ad-free so people are more likely to bookmark it and visit it later (and social bookmarks = google page rank, so you trade a little up-front money for more sustained traffic and customer good will). So your ad system should include time-based conditions (If publication date < 15 days, don't display ads, etc).
If your ad is for a firefox extension your ad-server should be smart enough not to serve these ads to IE users. (google's firefox+google toolbar commission is a good example, it's majorly pointless to serve this recomendation ad if your visitor is already using firefox).
Then there is the new wave in ad publishing, the ability to turn ads off for a day or two (or more). It seems pretty crazy but click-through rates increase ~50% after offering this option. A lot of people will click an ad before they disable them. So there needs to be a cookie system to remember when a user has asked to have ads turned off.
And then there's the testimonial, commission ads. I have one for my web host (sweet commission when anyone signs up through that ad), but it can't be served as part of the page or you really screw yourself up with google. So after the page loads an iframe loads the ad as separate content for the benefit of the search engines.
And speaking of search engines, if you're serving your owns ads you didn't forget the rel="nofollow" attribute on the link so you're not bleeding page rank are you?
Hehe, fun stuff. Rotating the banner is just the first pill before the rabbit hole.
Voters For This Link (12)
Voters Against This Link (0)