How can I tell if a web client is blocking ads?

What is the best way to record statistics on how many people coming to my site have set their browser to block ads?

I suppose you could compare the ad prints with the page views on your website (which you can get from your analytics software).

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.

If your adverts are on a separate server, then I would suggest it's impossible to do so.

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.

Add the user id to the request for the ad:

<img src="./ads/viagra.jpg?{user.id}"/>

that way you can check what ads are seen by which users.

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.

The next thing is to see if they are blocking flash, a small movie should do that.

If you look at the adblock site, there is some indication of how it does blocking:
How does element hiding work?

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.