Many site owners with good traffic try their hand at a little bit of advertising. But, which advert out of the choice of many works best?

Well that is the question I faced. I knew adding another advert to one of my websites would make it too heavy in the advertising front. And the problem is that this week I am trying out 2 different adverts.

Which earns the most?
One is for free business cards and the other for free PPC Advertising. Which would generate the best revenue?

There are two ways of testing this. Put one advert up, leave it running and then swap it over. But, how do you know that the trial is equal before deciding which earned the best income? That way is no good.

Random display testing
So my preferred method is random displaying. This should work very well as many people do read multiple page on that blog, so could get to see both adverts! How do you code it?

Well very simply in PHP, using this code:

<?php
$addswitch = rand(1, 2);
if ($addswitch == 1) { ?>
[html for first advert]
<?php } else { ?>
[html for second advert]
<?php } ?>

The vital line of code!
Yes, very basic and might be better with a switch statement, but the important aspect is that rand(1,2) statement. That is asking for a random number between 1 and 2. If you wanted to test more adverts or to weight an advert, that could become rand(1,3) etc.

But using even weighting, over the course of a few thousand page hits all thing should be roughly equal. So in a week I’ll look at both systems and see what income they have made. If neither is doing well then I might just put back the Google Adsense block I had there!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Related posts:

  1. PPC vs SEO
  2. Finding The Greatest Worth Out of Paid Links
  3. Locating Your Individual Free Automatic Wealth Scheme
  4. The easiest form to email script I ever did write!
  5. How To Get More Hits For Your Website
  6. Promoted Tweets
  7. Tips For Getting Traffic to Stay at Your Site For Longer
  8. Are Affiliate Links Damaging To Your Website – Part 2
  9. Common Mistakes That New Bloggers Make – Web Design
  10. Why are mobile apps so expensive?