Software, your way.
How To Get Good Custom Software
(Download)
(PDF)
burger menu icon
WillMaster

WillMaster > LibrarySecurity and Blocking

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

Restoring Income Lost By Ad Blockers

How to Foil Ad Blockers How much website revenue are you losing because of ad blocking? Free software to measure. Free software to substitute blocked ads. Ad blockers are likely to block: Popular ad-delivery services (Google's AdSense, for example). Linked images that have names beginning with "ad" or "af" can indicate they're images for an advertisement or for an affiliate product. Linked images in subdirectories that have names beginning with "ad", "af", or the first few characters of popular ad-delivery service websites.

If you make money from website ads, ad blockers cut into your income. (There is a way to restore some of it.)

Still, it's hard to justify the blaming of people for installing ad blockers.

People really don't care to view obnoxious ads. There are ads so distracting that it's well-nigh impossible to focus on the regular page content. And some ads have such a huge file size it seems like it takes forever for a page to load.

It's really no wonder people use ad blockers to shield themselves from the onslaught.

If a person could block only obnoxious, excessively distracting, and huge ads, that would be truly wonderful. But it's either all ads or no ads.

By "all ads" I mean all ads that an ad blocker blocks.

In other words, ad blockers are blocking ads on your website even if you never publish obnoxious, distractive, or huge ads.

If you have the technical know-how, some ad blockers allow you to adjust which ads are and are not blocked and which websites to exempt — to affect your own ad blocker installation. Yet, most people aren't that savvy or, once the ad-free experience is experienced, are likely to be hesitant about allowing some ads that are currently blocked.

Be all that as it may, ad blockers block website income.

Ad blockers block website income.

A good third of all web pages viewed at willmaster.com are viewed with ad blockers (37.2% as of this writing). If we were dependent on ads for a large part of our income, ad blockers would inflict a deep hurt — $37 of every 100 dollars lost forever, day after day, month after month.

Our site visitors tend to be more tech savvy than most non-technical site visitors are likely to be, which may be why we have so many visitors with ad blockers. Other sites may experience a lower percentage.

Viewing Your Own Site With an Ad Blocker

The way to view your site as it's seen with an ad blocker is to temporarily install one.

Adblock Plus is probably the most popular browser ad blocking plugin/add-on/extension. View your site with that one.

Leave the Adblock Plus settings at default. Default is how many, perhaps nearly all, people use their ad blockers. You want to view your site the way others see it.

If you publish AdSense, ads from ad distribution services, have ads in folders named "ad" or "ads" or similar, or use images with a standard banner size in the image file name, your ad is likely to be blocked.

Actually, there are many, many rules an ad blocker follows to determine whether or not something is an ad. See https://easylist.to/easylist/easylist.txt (2.3 MB) for the default Adblock Plus list of rules.

How to Restore Some Lost Ad Income

The method to restore at least some income lost by ad blocking is simple in concept: When an ad is blocked, replace it with an unblocked ad.

For every primary ad (one that gets blocked with ad blockers) have an alternate ad ready to publish.

The alternate ad doesn't have to be an ad, of course. It can be any message — a "Thank you for visiting this website" notice, for example.

Put both the primary ad and the alternate ad into a div. That's the ad container.

The height of the ad container is equal to the height of the primary ad. Its CSS style overflow:hidden; ensures only one of the ads is displayed.

When the primary ad is displayed (not blocked), the alternate ad is hidden. When the primary ad is blocked, the alternate ad is displayed.

Here's a diagram for a 300x250 ad.

Primary
Alternate

The blue border indicates the ad container. Inside the container are the primary ad and the alternate ad. Only one can be displayed in the view area defined by the ad container. The other (grayed-out in the diagram) is invisible.

When an ad blocker knocks out the primary ad, the alternate ad moves up into the view area of the ad container.

Alternate

The above illustrates the result when the primary ad is blocked. With the primary ad gone, the alternate ad moves up into the ad container's view area.

For it all to work, a few things are required:

  1. The ad container div needs to be the exact size as the primary ad. And, it needs to have the CSS style overflow:hidden;

  2. The primary ad is in a div without a height specification. Without the height, the div will collapse when the primary ad is removed by the ad blocker. As the div collapses, the alternate ad moves up into its place.

The alternate ad would usually be the same size as the primary ad. It may be smaller, but not larger because excess would be hidden from view.

Implementation

Here's the code for an ad container to hold a 300x250 primary ad and a 300x250 alternate ad.

<div style="width:300px; height:250px; overflow:hidden;">
<div style="width:300px;">
[primary ad]
</div>
<div style="width:300px; height:250px;">
[alternate ad]
</div>
</div>

The ad container div is colored blue. The width and height need to be that of the the primary ad. The CSS style overflow:hidden; is also required.

The div with the primary ad is colored red. It's width may be specified. But no height. Height specification must be absent so whenever the primary ad is blocked the div can collapse and allow the alternate ad to become visible.

The div with the alternate ad is colored orange. The width and height specifications are optional. The alternate ad should be no larger than the primary ad.

The Alternate Ad

As indicated earlier, the alternate ad doesn't have to be an ad. It can be a notice or message. And the space where the alternate ad would be can even be empty.

Whatever its content, the ad blocker must not recognize it as an ad. Otherwise, it will also be blocked.

Here are some things at least some ad blockers look for.

  • Ads delivered by advertisement distribution services and affiliate marketing services.

  • Links with "af=" or "afid=" as a URL parameter, or other parameter information that indicate it's an affiliate link.

  • Images sizes within file names (like ad468x60.jpg), especially when the size corresponds to a popular ad size.

Because there are so many things an ad blocker looks at, and its rules frequently updated, the best way to determine whether or not your alternate ad is spotted by an ad blocker is to test it. Put it on a test page on your server, load the page into your browser, and see if the ad remains visible.

Here are a few more things that are likely to trigger an ad block.

  • Images with file names beginning with "ad", "adv", or "af", especially when the size corresponds to a popular ad size.

  • Images linked to URLs different than the domain where the web page is at, especially when the image size corresponds to a popular ad size. (To sidestep this, Short URL V3 may be used. The link URL is to your site installation of Short URL V3 and the browser is redirected to the correct location.)

  • Images retrieved from subdirectories with names that indicate they contain images for ads — subdirectory names with beginning with "ad", "adv", "af" could trigger an ad block, as examples.

When you test your alternate ads to see if they get blocked by an ad blocker, use the Adblock Plus browser plugin/add-on/extension. Adblock Plus seems to be the most popular and ads that pass its inspection are more likely to pass the inspection of other ad blockers. But do test other ad blockers, too, especially if your audience is likely to use them.

Carefree Ad Manager can be used to publish ads unlikely to be blocked. The ads are locally delivered (meaning ad blockers are less likely to spot them as an ad) and ad links can be to the Carefree Ad Manager software itself for redirecting (meaning link URLs are to the local domain, making it even less likely to be spotted as an ad).

It's possible to regain control from ad blockers and display an alternate ad or message.

(This article first appeared in Possibilities ezine.)

Will Bontrager

Was this article helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method

All information in WillMaster Library articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2024 Will Bontrager Software LLC