View Full Version : How to minimize an alternative ad?
Hi.
I don't know how to display just nothing (or 1x1 px gif?) when there is no AdSense ad.
I want to save place on the website if AdSense doesn't serve anything.
Any ideas?
Szy.
EdenView
Jan 2nd 2005, 8:10 am
If you have another adsense ad above the one with no content, then the second one doesn't even load on some of my pages.
Also, you could have alternative ad code be blank space so when it's PSA's nothing but blank space shows up.
Also, you could have alternative ad code be blank space so when it's PSA's nothing but blank space shows up.
... yes, this space makes me crazy... :mad:
Szy.
Will.Spencer
Jan 2nd 2005, 9:21 am
Set your AdSense alternative ad as such:
google_alternate_ad_url = "/google_adsense_script.html";
And then include this code in the file /google_adsense_script.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<script src="http://pagead2.googlesyndication.com/pagead/google_adsense_script.js" type="text/javascript"></script>
</head>
<body style="background-color: transparent;">
</body>
</html>
my3cents
Jan 2nd 2005, 9:25 am
In addition to Will's code above, it is also important to note that this "collapsing" ad space code only works in IE... at least last time I checked... But that covers 85% of your users for most sites... At least until Firefox takes over the world... ;-)
Set your AdSense alternative ad as such: (...)
Great, it works! Thank you :)
Szy.
EdenView
Jan 2nd 2005, 3:54 pm
At least until Firefox takes over the world... ;-)
The sooner the better :rolleyes:
But it works in FF too. At least in my 1.0 PL version.
Szy.
TechEvangelist
Jan 3rd 2005, 8:04 am
Good tip Will
I just started using AdSense on a site and I was contemplating how to accomplish this.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.