How to Use Google Adsense Collapsing Ad Units

By Posted 2006 Updated   AdvertisingGoogle

Do you know you can get collapsing Adsense ad units, and collapse the free space instead of showing Public Service Ads. Are Google Adsense Public Service ads and public service ads spoiling your professional website design? Alternate urls do not work for you? Then you need to activate Collapsing Ad Units… I do.

Google Adsense Collapsing Ads

Simply put, if there are no targeted ads available, then instead of showing public service ads (PSA) (or alternate ads / blank colours if specified) – the collapsing ad unit code will ‘collapse’ your ad unit so that it takes up no page space and your website appears as if no Google Adsense ad was places there. This helps to remove huge unused and non monetizing web space.

How can you make collapsing ads work on your site?
First you will need to download and host a small collapsing ad units HTML file on your domain. Host this file on each of your domains and subdomains in order to use the collapsing ad units feature. In the Alternate Ads URL text box, enter the fully defined path to the collapsing ad units HTML file on your domain.

Typically the file code looks like this and you can save it as google_adsense_script.html and upload to your server.

<!DOCTYPE html>
<html lang="en">
<head>
<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>

This ensures you get a blank file with a transparent background which matches the background where the ad should have appeared.

Will it work on your Blogger blog? Only if site is hosted on an external server or you previously upgraded to Blog*Spot Plus. I am routinely using it on this blog and see no Public service ads.


Leave a Reply

Your email address will not be published. Required fields are marked *




css.php