19 Aug 2016 - by 'Maurits van der Schee'
More and more people use ad blockers and more and more sites try detect them. Sites say that their visitors are stealing their content, by not "paying" by viewing ads, while visitors claim that sites do not comply with the law and blocking third party contents is the only way to protect their privacy when using the Internet.
I have nothing against ads, but the practices of the "ad tech" industry are appalling. The "ad tech" industry mainly consists of ad "brokers". The most well-known player in that market is "Google ads". Some of these brokers (if not all) allow their clients to run scripts on the sites the site owners request ads for.
Below you find an easy ad blocker detection script, so that you can warn your users that they put their privacy at risk by not enabling an ad blocker.
Are ads blocked?
You should see the answer to the question in either red (No) or green (Yes). The code for this detection is:
<script>document.write(adsAreBlocked?'<p style="color:green">Yes</p>':'<p style="color:red">No</p>')</script>
The URL "