Eliminate the gaps left by AdSense if it does not serve ads

You use Google to monetize your site, and sometimes ads are not showing on one or more pages?

This is because Google AdSense is unable to find advertisers who are willing to bid on your page at that time. Or you may have blocked certain categories of advertisers from bidding on your page. Also, if your page is updated daily, very old posts may not show ads but gaps in the ad position.

Following is a page with a Google AdSense ad placed somewhere in the middle of the page.

iguruads

And below is the same page, but the ad has been replaced with a blank .

igurunoads

In the background

When any Google AdSense ad unit on your site sends an ad request to Google Servers, the AdSense server responds with an ad or sets the ad unit status to unfilled, which means there are no ads for viewing at that time.

If you do not want to see gaps in your site due to the unavailability of ads, you can hide unfilled ad units with CSS.

Open your site's main CSS or custom CSS te and add the following CSS code:

  ins.adsbygoogle[data-ad-='unfilled'] { display: none !important; }

From now on, if there are vacancies of ads on your site, they will not appear. You can also consider replacing the blank AdSense ad unit with an alternative image that links internally to one of your own pages.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.087 registrants.
AdSense, ads, google, css, iguru

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).