Here’s a simple code snippet that will allow you to randomly display different ad formats using Google AdSense. You’ll want to set up each ad as a separate custom channel in AdSense so you can track the results as they come in. Testing different ad widths, heights, formats, etc can help you maximize your revenue. See which channel provides the highest CTR and, ultimately, revenue. I use this on a few sites to find which ad formats work best.
A few observations I’ve had over the years with testing ad formats:
- Larger ads tend to have much higher CTR
- Wider ads improve CTR
- Rich media ads have higher CTR (and pay more)
You’ll want to test everything though, as the most effective option depends largely on your website’s layout, content and audience.