J
J
Jony13372015-01-03 09:54:19
Ad blocking
Jony1337, 2015-01-03 09:54:19

How to bypass banner blocking?

More and more webmasters are wondering how to bypass banner blocking and disable the AdBlock Plus and Adguard extensions?
Can you share some tips on how to theoretically do this
How to get around this Adblock so that ads are shown?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Vyushin, 2015-01-03
@e-vyushin

You can bypass adblock. To do this, we need:
1. Detect adBlock from the user
2. Load ads from another source
adBlock by default blocks the ads.js file wherever it is.
This is what you can use. Create an ads.js file and write to it:
Next, attach the file to the HTML page:

<script type="text/javascript" src="assets/js/ads.js" charset="UTF-8"></script>
<script type="text/javascript">
    if (window.adBlockDisabled !== true) {
        console.info('У пользователя включен adBlock');
    } else {
        console.info('adBlock у пользователя выключен');
    }
</script>

How it works? Simple enough.
If the user has adBlock enabled, then the ads.js file will simply not load and the window.adBlockDisabled property will not be defined. Then, using the appropriate condition, we can detect adBlock and then perform certain actions (including loading ads from sources that adBlock has not blocked).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question