How to Collapse Google ads

Collapsing ad units are an optional advanced feature of Google adwords ads. The collapsing ad unit code will ‘collapse’ your ad unit so that it takes up no page space if there are no targeted ads available. This allows you to minimize any blank space that would otherwise occur through the use of alternate colours.

To implement the collapsing ad units feature, you’ll need to host a small HTML file on your domain. Your alternate ad URL will reference this file, which will be called if there are no ads available for that particular ad unit. Please follow the instructions below:

  1. Download the collapsing ad units file by right-clicking the link below and selecting Save Target as�
  2. Copy this file to any location on your domain. Important: if you are running ads on multiple domains or subdomains, you will need to host this file on each of your domains and subdomains in order to use the collapsing ad units feature.
  3. In the Alternate Ads URL text box, enter the fully defined path to the collapsing ad units HTML file on your domain.
    For example: code>
  4. Click Update Code
  5. Copy and paste the ad code into your web pages. You must ensure that the alternate ad references the collapsing ad units script on the same domain or subdomain as your web page. For example, if your alternate ad URL references the collapsing ad units HTML file on, you cannot place this ad code on any page of or on any page of Doing so will result in errors on your page.

If you have successfully implemented the collapsing ad unit code, your ad units will disappear when targeted ads are not available. Please note that this feature will not work with Internet Explorer version 5.0 or lower any unused ad units will appear as empty, transparent boxes.

3 Replies to “How to Collapse Google ads”

  1. Do you get paid to put google ads on your website. Somehow they are not that appealing.

    p.s have worked for Ceneka before. cheers.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.