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

You're using Google AdSense to monetize your site, and sometimes the 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 space.

igurunoads

In

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 the that you use and add the one below CSS:

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

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

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.100 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.).