Welcome to WebmasterWorld Guest from 54.159.51.118

Forum Moderators: martinibuster

Message Too Old, No Replies

Detecting ad blockers.

Most reliable method?

     
3:32 pm on Mar 11, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 25, 2004
posts:996
votes: 47


I live in a state where Amazon just started allowing affiliates again.
After rejoining, I placed a generic "support this site" type statement in the footer of pages (a link to the Amazon home page with my tracking code).
I noticed that since this is just a link, ad blockers don't block it from showing.

That lead me to think why not test for adblockers and show this same notice higher up in the page when my regular ads aren't showing. (I'm assuming people hate ads, but aren't necessarily adverse to supporting a website.)

And actually if this works out well, why not make my own "adlink" type of units containing links to individual products in amazon?

So, what is the most reliable way to test for adblocking?

Since Adsense is my main focus here, I'm currently using a script that detects when files named "adsbygoole.js" are blocked. If it is, my support notice shows (switches the default setting display:none to display:block so my unit is seen).

Is there any reason why that wouldn't be an infalible acid test (as in my units would never be seen on the same page as Adsense ads)?
Would it be against Adsense TOS for me to have a file named "adsbygoogle.js" on my own server (my test file)?

I'd love to have things configured in the future where my substitute support unit would occupy the exact same page real estate as one of my Adsense ads, but I'm assuming doing that type of ad swapping would probably violate Adsense TOS. Anyone know or already doing this?
4:28 pm on Mar 11, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 25, 2005
posts:1991
votes: 331


If it's just AdSense ads you're interested in checking, see this thread [webmasterworld.com]. The adsbygoogle variable is set by the adsbygoogle.js script, and will be undefined if that resource is blocked. At least that's how it used to work, I haven't tried it recently.

For other ideas, you could look at EasyList [easylist.to], the filter list that most ad blocker use.
5:53 pm on Mar 11, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 25, 2004
posts:996
votes: 47


I had seen the EasyList but wasn't sure how authoritarian that compilation was. Since you pointed it out I've read some more. Evidently that is the exact file that many of the bigger ad-blocking services use, so thanks.
6:01 pm on Mar 11, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 25, 2004
posts:996
votes: 47


I saw this post in the thread you linked to:
[webmasterworld.com...]

(It seems that WW strips out the anchor after a URL, the post was this:)
I can easily tell how many pages are affected by adblockers with a similar script I use to serve my own hosted adds if the Adsense container div doesn't load to the full width/height.


Anyone else doing this? I get it that if Adsense is not showing there should be no issue if you put another ad in its place. But Adsense policy doesn't always make sense, is doing this in no way against Adsense TOS?
6:19 pm on Mar 11, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 25, 2005
posts:1991
votes: 331


I don't think the AdSense TOS apply when no AdSense ads are loaded. To the user, and to Google, it's as if you never tried to load an AdSense ad in the first place. You'll of course want to make sure your code is solid to avoid replacing a live AdSense ad with a different one, because that (accidental or not) will certainly be against the TOS.

(Posting a message is taking an awful lot of time today, what's up with that? This message was already posted (I could see it in a separate browser tab) but the request stalled for several more minutes.)