<p>What is the best way to record statistics on the number of visitors visiting my site that have set their browser to block ads?</p>

[{'answer_id': 2476, 'author': 'Vaibhav', 'author_id': 380, 'author_profile': 'https://Stackoverflow.com/users/380', 'pm_score': 2, 'selected': False, 'text': '<p>I suppose you could compare the ad prints with the page views on your website (which you can get from your analytics software).</p>\n'}, {'answer_id': 2477, 'author': 'GateKiller', 'author_id': 383, 'author_profile': 'https://Stackoverflow.com/users/383', 'pm_score': 5, 'selected': True, 'text': "<p>Since programs like AdBlock actually never request the advert, you would have to look the server logs to see if the same user accessed a webpage but didn't access an advert. This is assuming the advert is on the same server.</p>\n\n<p>If your adverts are on a separate server, then I would suggest it's impossible to do so.</p>\n\n<p>The best way to stop users from blocking adverts, is to have inline text adverts which are generated by the server and dished up inside your html.</p>\n"}, {'answer_id': 2478, 'author': 'Jonathan Works', 'author_id': 309844, 'author_profile': 'https://Stackoverflow.com/users/309844', 'pm_score': 3, 'selected': False, 'text': '<p>Add the user id to the request for the ad:</p>\n\n<pre><code>&lt;img src="./ads/viagra.jpg?{user.id}"/&gt;\n</code></pre>\n\n<p>that way you can check what ads are seen by which users.</p>\n'}, {'answer_id': 2479, 'author': 'UberAlex', 'author_id': 170, 'author_profile': 'https://Stackoverflow.com/users/170', 'pm_score': 2, 'selected': False, 'text': '<p>You need to think about the different ways that ads are blocked. The first thing to look at is whether they are running noscript, so you could add a script that would check for that. </p>\n\n<p>The next thing is to see if they are blocking flash, a small movie should do that.</p>\n\n<p>If you look at the adblock site, there is some indication of how it does blocking:<br>\n<a href="http://adblockplus.org/en/faq_internal#elemhide" rel="nofollow noreferrer">How does element hiding work?</a></p>\n\n<p>If you look further down that page, you will see that conventional chrome probing will not work, so you need to try and parse the altered DOM.</p>\n'}, {'answer_id': 4187, 'author': 'Michal Sznajder', 'author_id': 501, 'author_profile': 'https://Stackoverflow.com/users/501', 'pm_score': 2, 'selected': False, 'text': '<p>AdBlock forum <a href="http://adblockplus.org/forum/viewtopic.php?t=2107&amp;postdays=0&amp;postorder=asc&amp;start=60" rel="nofollow noreferrer">says</a> this is used to detect AdBlock. After some tweaking you could use this to gather some statistics.</p>\n\n<pre><code>setTimeout("detect_abp()", 10000);\nvar isFF = (navigator.userAgent.indexOf("Firefox") &gt; -1) ? true : false,\n    hasABP = false;\n\nfunction detect_abp() {\n  if(isFF) {\n    if(Components.interfaces.nsIAdblockPlus != undefined) {\n      hasABP = true;\n    } else {\n      var AbpImage = document.createElement("img");\n      AbpImage.id = "abp_detector";\n      AbpImage.src = "/textlink-ads.jpg";\n      AbpImage.style.width = "0";\n      AbpImage.style.height = "0";\n      AbpImage.style.top = "-1000px";\n      AbpImage.style.left = "-1000px";\n      document.body.appendChild(AbpImage);\n      hasABP = (document.getElementById("abp_detector").style.display == "none");\n\n      var e = document.getElementsByTagName("iframe");\n      for (var i = 0; i &lt; e.length; i++) {\n        if(e[i].clientHeight == 0) {\n          hasABP = true;\n        }\n      }\n      if(hasABP == true) {\n        history.go(1);\n        location = "http://www.tweaktown.com/supportus.html";\n        window.location(location);\n      }\n    }\n  }\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/2472', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/116/']