256 Kilobytes

AdBlock 101: How to detect and beat AdBlock - Stop losing money to content thieves and internet socialists

Articles in Internet Marketing | By Hash Brown

Published 7 months agoThu, 28 Mar 2019 15:38:18 -0700 | Last update 6 months agoFri, 10 May 2019 08:52:35 -0700

Are you sick of AdBlock destroying your websites revenue? Learn how to beat AdBlock and show your adverts to all your users.

487 views, 1 RAM, and 2 comments

For those run a website that depends on advertising to make money, AdBlock is your enemy. This extension that allows freeloading individuals to enjoy your content in a one-way transaction is costing webmasters millions per year in lost revenue.

Since AdBlock has grown in popularity we are seeing several sites adapt and change how they offer content, subscriptions are common as are requests to turn AdBlock off before viewing the website.

We are also seeing smart advertisers (such as 256kilobytes.com) creating their own methods to beat AdBlock, helping their advertisers connect to everyone when they pay to advertise there.

In this article we will talk about:

  • Business models that help combat AdBlock
  • How AdBlock works
  • Detecting AdBlock programmatically
  • How 256kilobytes gets around AdBlock

What is AdBlock?

AdBlock is a free web browser extension that is designed to block adverts. AdBlock works by filtering out elements that it detects could be an advert.

AdBlock was released in 2009, it was inspired by Adblock Plus which originally ceased development in 2004 before being relaunched.

Since AdBlock was released several other alternatives have been created which mirror the basic functionality of AdBlock.

Why is it bad?

AdBlock is bad for both parties in some respects. For the user we have no idea what data they are collecting and selling. Clickstream data is a huge industry and of great importance to marketing companies that require information such as what websites you visited, what you did on these websites and how long you did it for.

Dozens of Chrome extensions sell this data, for many mining information from their users is the only way they can make money beyond donations or premium options which aren’t always worth creating for developers.

For web masters and website owners there’s even more reason to dislike AdBlock. First if people aren’t seeing your adverts you aren’t getting paid, people are going to be using your website, seeing your content, using your server resources and you’re getting nothing in return. This is a one way transaction and it’s not entirely fair.

Beyond that, the content filtering system that AdBlock runs can break core functionality. This is very common with JavaScript, web forms and file uploading.

How many people run AdBlock?

According to Marketing Land, around 40% of desktop users and 22% of mobile users run AdBlock. This is a huge chunk of internet users.

In addition to this, Google have added a similar technology directly into Chrome which will roll out in July 2019. It will natively block intrusive and annoying adverts without users even needing to enable AdBlock extensions.

If your adverts break some of these rules you may see a drop in impressions:

  • Auto playing sound
  • Adverts with count downs
  • Flashing and animated ads
  • Pop ups
  • Adverts that block content
  • Where the ratio of advert to content is more than 30%

How much advertising revenue is lost to AdBlock?

With so many people running AdBlock it’s fair to assume that website owners are losing around 40% of their revenue if 40% of people are running AdBlock. For huge companies they can get around this with other monetisation methods but the people it truly hurts are the small creators such as YouTubers and small bloggers.

Losing 40% of your revenue can really hurt when it’s the difference between needing a second job not.

Business Strategies for AdBlock

Since AdBlock has become more common websites have had to adapt how they handle these users and monetise. These slight twists to their business models have saved many of publishers in the “adpocalypse” era we now live in.

Forcing Whitelisting

Asking AdBlock users to whitelist your website from their AdBlock program before allowing them to read and view your content is common.

Adblock

If you run a WordPress blog there are plugins that do this and make it easy that you can use.

The problem with asking for your website to be whitelisted is you’re likely to increase your bounce rate, you’re relying on the ability of the user to know how to do this and because there are so many AdBlock plugins that do the same thing writing a guide or instructions on how to do this is not possible.

Subscriber Memberships

If your users are repeat readers of your content adding a subscriber option where they pay a small monthly fee to read your content without adverts might be an option. This is commonly seen in online press where news companies are moving to this model to make up the shortfall, journalists are expensive to hire, and advertising revenue doesn’t always make ends meet.

Some news outlets are moving to exclusively subscribe and membership options with no free alternative at all, The Times is a great example of this.

AdBlock whitelisting

Native Advertising

If you understand how AdBlock works you can begin to engineer options for building a system designed to skirt their detection. This usually involved in running your own native advertising system which is what 256Kilobytes has done.

AdBlock works by finding common footprints in adverts and just removing them from the browser while it renders the page. These footprints could be:

  • Common advertising networks – detecting and blocking their servers is very easy
  • File names – if you’re uploading banners as advert1.jpg or 728x90.jpg it’s a bit of a giveaway
  • Elements – if you have elements with the class or id of “ad” you’re making it easy

If you use common sense when adding in the code to display the adverts and serve your banners from the same domain as your website, you’re going to get around AdBlock very easily.

This does mean you will have to sell your own adverts and find advertisers yourself, but if you have a niche website with a solid audience and userbase this is not as hard as you will think.

This system can be as easy as charging a monthly fee from advertisers and swapping images manually every week/month or building your own simple advertising interface that handles it all.

There are also scripts that can handle this for you.

Detecting AdBlock

To really begin combatting AdBlock we need to know when people have it activated so we can decide what to do.

The basic idea of detecting AdBlock is to create an element that looks like an advert and then test to see if the element is present on the page after it is rendered in the browser.

AdBlock uses a list of around 80,000 known advertising services, patterns and file names. When your browser loads your HTML the AdBlock plugin will compare the HTML and referenced files to this list and then filter them based on this.

You can see the complete list that AdBlock uses here.

Step 1: Create a file called ads.js

We are going to use a file called "ads.js", this is a common filename used when creating systems for advertising and this will flag up when AdBlock reads our websites source code.

Within this file we are going to use this:

var ad=document.createElement('div');
ad.id='tZhu48Sjl3';
ad.style.display='none';
document.body.appendChild(ad);

This will append a div with an id "tZhu48Sjl3" to our page. The obscure id is to prevent conflicts with elements that you may already have on your website.

Upload this to your websites root.

Step 2: Add our check for ads.js

Within your websites HTML source code we are going to add a reference to our ads.js file and then test to see if it loaded or not.

This code should be added before your closing body tag.

<script src="/ads.js" type="text/javascript"></script>
<script type="text/javascript">
if(document.getElementById('tZhu48Sjl3')){
  alert('Blocking Ads: No');
} else {
  alert('Blocking Ads: Yes');
}
</script>

This uses getElementById() to run a quick search within our source code for our tZhu48Sjl3 div.

If the div cannot be found then ads.js has been blocked. The result of this test is sent to the browser in an alert.

Step 3: Ask the user to whitelist your page

If you want to go further than step 2 and add a message asking for the user to disable AdBlock, you can do this too very easily.

Replace the code in step 2 with this code.

<script src="/ads.js" type="text/javascript"></script>
<script type="text/javascript">
if(!document.getElementById('tZhu48Sjl3')){
  document.getElementById('WBFfqUtiPbCg').style.display='block';
}
</script>

Once this is done you shall want to add this to your CSS file.

#WBFfqUtiPbCg {
display: none;
margin-bottom: 30px;
padding: 20px 10px;
background: #D30000;
text-align: center;
font-weight: bold;
color: #fff;
border-radius: 5px;
}

And then add this HTML to where you would like the message to appear.

<div id="WBFfqUtiPbCg">
  Our website is made possible by displaying online advertisements to our visitors.<br>
  Please consider supporting us by disabling your ad blocker.
</div>

Instead of this red message, replacing that HTML with a lightbox or something that blocks the content is very possible and wouldn't require much work.

How to show ads to people with AdBlock

The best way to beat AdBlock is with native advertising. This is eactly what 256Kilobytes does with it's own advertising engine.

*Will my advertisement be blocked by Adblockers?*
Adblockers generally work by identifying particular elements of a webpage that are being imported to a website from an external server, such as a CDN designed for serving advertisements. While most advertisements served to many websites on a pay-per-click or pay-per-impression basis can be blocked because of this, the advertisements on 256 Kilobytes are hosted directly on the 256kilobytes.com domain the same as any other image, which ensures that advertisements are seen regardless of whether or not a user is running an adblocker.

So how would you create such a thing? Lets look at the source code which AdBlock allows to be displayed on this very website.

<div class="banner-wrapper">
        <a rel="nofollow" href="https://www.dreamhost.com/r.cgi?1435880/promo/dreamsavings50/"><img class="banner sm" alt="" src="/storage/b/b-sm.jpg"></a>
        <a rel="nofollow" href="https://www.dreamhost.com/r.cgi?1435880/promo/dreamsavings50/"><img class="banner md" alt="" src="/storage/b/b-md.jpg"></a>
        <a rel="nofollow" href="https://www.dreamhost.com/r.cgi?1435880/promo/dreamsavings50/"><img class="banner lg" alt="" src="/storage/b/b-lg.jpg"></a>
</div>

As we can we we have a very simple link with an image inside. The three images are controlled by their class for difference window sizes and devices.

This content was served from the 256kilobytes.com domain, the files names are very normal and don't flag on the AdBlock easy list so AdBlock has no reason to block it.]

If you are selling your own advertising running a system like this is very simple and could be controlled by simply editing source code and a Google sheet outlining who paid for how long and what advert content they wanted to display.

This is a little ghetto but would work fine, if you want something a little more "serious" there are a few self hosted scripts and solutions that would give you more control and data.

Some of these soltions (not tested or endorsed by us) are below:

Native advertising for normal websites

Native Advertising for WordPress

A lot of people run WordPress and there are many plugins that help websites run their advertising.

Conclusion

AdBlock is the scurge of the internet and handling people that want to run it can really boost revenue for those who have missed out but we have to ask ourselves why do these people run AdBlock in the first place?

  • Are they angry at websites making money?
  • Are they anti capitalist?
  • Are they offended by advertising?

I think it's probably a mixture of all these reasons, along with that adverts are just annoying. 

Look at this screenshot of the Daily Mail, I have coloured their adverts in red to highlight the issue.

AdBlock stabs man in Mosque

Not only are they intrusive, they also made the website much slower and the auto playing video in the bottom right made me want to self suck my brain out my dick.

If you are going to advertise, don't be a cunt about it.

Users Who Have Downloaded More RAM:
August R. Garcia (7 months ago)
🐏 ⨉ 1
Posted by Hash Brown 7 months ago

Edit History

• [2019-03-28 15:38 PDT] Hash Brown (7 months ago)
• [2019-03-28 15:38 PDT] Hash Brown (7 months ago)
🕓 Posted at 28 March, 2019 15:38 PM PDT

Profile Photo - Hash Brown Hash Brown Internet Activist &... United State of Euro...
🗎 62 🗨 454 🐏 218
Staff

Some other content you may like:

SEO:

Affiliate Marketing:

Other:


Account created 11 months ago.
62 posts, 454 comments, and 218 RAMs.

Last active 17 hours ago:
Commented in thread How to hack a DSI?

Profile Photo - August R. Garcia August R. Garcia LARPing as a Sysadmi... Portland, OR
🗎 198 🗨 987 🐏 299
Site Owner

Bump. What a nice thread.

Download more RAM. 🐏 ⨉ 0 Posted by August R. Garcia 7 months ago 🕓 Posted at 30 March, 2019 16:21 PM PDT

Sir, I can do you a nice SEO.

Profile Photo - August R. Garcia August R. Garcia LARPing as a Sysadmi... Portland, OR
🗎 198 🗨 987 🐏 299
Site Owner

Interesting and sort-of-obvious-now-that-you-mention-it method for detecting ad blockers:

Download more RAM. 🐏 ⨉ 0 Posted by August R. Garcia 2 weeks ago 🕓 Posted at 01 November, 2019 01:17 AM PDT

Sir, I can do you a nice SEO.

Post a New Comment

To leave a comment, login to your account or create an account.

Do you like having a good time?

Read Quality Articles

Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.

View Articles →

Argue with People on the Internet

Use your account to explain why people are wrong on the Internet forum.

View Forum →

Vandalize the Wiki

Or don't. I'm not your dad.

View Wiki →

Ask and/or Answer Questions

If someone asks a terrible question, post a LMGTFY link.

View Answers →

Make Some Money

Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.

Register an Account
You can also login to an existing account or recover your password. All use of this site is subject to terms outlined in the terms of service and privacy policy.