« Text formatting MT Plugins | Main | Contact Form in PHP »

AdSense and JavaScript

Did you know that AdSense ads don't display if JavaScript is displayed in a user's browser? It's true, try it and see. About 10% of web users don't have JavaScript or have turned it off. If you just rely on AdSense your missing out on some advertising revenue. Here's what to do.

The first thing is to arrange some alternate affliate ads. Finding ads for your site will have to be the topic of another post.

These ads will have to be bits of HTML code. What you need to do is imbed this HTML in <NOSCRIPT>ad here</NOSCRIPT> tags just after the AdSense code.

Here's a complete sample:

<table border="0" cellpadding="5" cellspacing="0" width="160">
<a HREF="http://www.1shoppingcart.com/app/?Clk=1064230" target="_blank" border="0">
<img src="http://www.creativekidsathome.com/images/affiliate/bbwheel2.jpg" alt="If you have kids, you NEED the Wheel!" border=0 width="150" height="132"></a>
<font face="Arial" size="2">
Hang the <a href="http://www.1shoppingcart.com/app/?Clk=1064230" target="_blank"><font color="blue">Wheel of
Better Behavior</font></a>
on your kitchen wall, and the atmosphere in your home will change overnight. It's
guaranteed! Watch the dramatic changes as homework gets done, clothes get
picked up, arguing stops...in short, the Wheel produces great kids and a stress
free environment! The mere presence of the Wheel will have a marked effect on
your kids. Chances are, you'll seldom even have to spin it!</p>
<p><a HREF="http://www.1shoppingcart.com/app/?Clk=1064230" target="_blank">Get the Wheel!</a><br>&nbsp;</p>

If the browser has JavaScript turned off they should see your alternate ad via the NOSCRIPT tag. If JavaScript is on but AdSense has no ad to display, then again your alternate ad will display via the google_alternate_ad_url. This way that space on your page will always have something to display.

ps. If your curious how many visitors to your site have JavaScript turned off, you can compare the page views in your AdSense statistics to the page views in your Webalizer statistics. You should have more page views in Webalizer. The addition views are mostly due to no Javascript, but also include web bots and crawlers.

© 2016 Mike Silversides


This page contains a single entry from the blog posted on March 12, 2007 8:20 AM.

The previous post in this blog was Text formatting MT Plugins.

The next post in this blog is Contact Form in PHP.

Many more can be found on the main index page or by looking through the archives.