Welcome to WebmasterWorld Guest from 54.162.48.54

Forum Moderators: incrediBILL & martinibuster

Message Too Old, No Replies

I Would Like to Be Able to Block Ads by IP

to make working on your own site safer

     
9:16 am on Feb 13, 2006 (gmt 0)

New User

10+ Year Member

joined:Feb 6, 2006
posts:23
votes: 0


This may be a stupid question, but does anyone know why google do not provide a feature whereby you can give them a short list of IP addresses to be discounted from adsense charging and various other metrics.

I know it would only be useful to people who are working from static IP addresses, but it does seem that even very professional webmasters sometimes accidentally click on an ad, and it would be nice to know that you can work on your own pages with impunity.

Supposing someone reported an odd javascript error with a certain browser. You might make hudreds of page views trying to reproduce it and work out exactly what was happening, and that could easily confuse the Adsense 'bot into believing that it was serving up inappropriate ads as the CTR would drop (depending on how popular the page was with the GP).

11:47 am on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member hobbs is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 19, 2004
posts:3055
votes: 3


It's not a stupid question, and has been asked before, they probably have it on their wish list.
12:27 pm on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Thinking just a bit outside the box here, it is not allowed to modify the Adsense code, but can't you simply surround the unmodified Adsense code with a PHP or SSI conditional include, based on your IP address or hostname?

For example, using a simple Apache Server-Side Include:


<!--#if expr="( ((${REMOTE_ADDR} != /192\.168\.0\.1/) && (${REMOTE_ADDR} != /10\.10\.10\.2/) )" -->

-Adsense code goes here-

<!--#endif -->


Using an "Else" clause, you could also include image placeholders for the suppressed ads, if their absence would otherwise throw off your page layout.

The technical approach is, I think, sound, but I am not sure about the answer to the "Is this allowed" part of the question. If used only to suppress ad serving to your own IP address, I would think this allowable, and in fact, undetectable.

Jim

12:38 pm on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member trillianjedi is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 15, 2003
posts:7242
votes: 0


Jim,

I've been using a similar system for the last 12 months without problem, selectively displaying Ads based on a set criteria. There's nothing in the AS TOS to say you can't do that.

In a thread I had in here (somewhere) about "rotating Ads", AdsenseAdvisor posted and certainly didn't complain. In fact, he/she welcomed the line of thinking.

In my particular case, it was about not showing ads to regulars all the time, but the process is identical.

You could drive this quite easily from a DB and have a blacklist of IP's.

TJ

2:34 pm on Feb 13, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 10, 2004
posts:568
votes: 0


adsonar/quigo have had just such a system for as long as I can remember (18+months) Maybe they just have better algorythmists than Google has. Alternatively maybe they care more, alternatively ... (time for the G cheerleader brigade to step in)
9:10 pm on Feb 13, 2006 (gmt 0)

Preferred Member

joined:Nov 28, 2005
posts:464
votes: 0


<!--#if expr="( ((${REMOTE_ADDR}!= /192\.168\.0\.1/) && (${REMOTE_ADDR}!= /10\.10\.10\.2/) )" -->

-Adsense code goes here-

<!--#endif -->

what is the maximum ip addresses I can ban with this script?

9:28 pm on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 25, 2005
posts:1019
votes: 0


<whinge>
I have an office at home, and we occasionally have guests coming to stay to whom we give internet access via our network - using the same IP as the one I use to upload pages and check Adsense stats.

I really hate having to give each guest a mini-training course on what an adsense ad looks like, and why they shouldn't go to my website and click on one. In fact, most of the time they look at me as if I'm a bit deranged, especially the ones who aren't as computer literate as the rest of us.

This week I'm away and a couple are coming to stay with my wife and son. I'm not going to 'provide any training' because I'll be gone by the time they arrive, so I'll have to cross my fingers that nothing happens whilst I'm away.
</whinge>

Please, ASA, can't we have an "ignore these IP addresses" feature?

"Pretty please"?

It'd help cure my insomnia :-)

9:57 pm on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jomaxx is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 6, 2002
posts:4768
votes: 0


Hosts file. Hosts file. Use the hosts file.

[added]Unless they use their own laptop, in which case you're back to detecting your own IP block from the server.[/added]

10:08 pm on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 25, 2005
posts:1019
votes: 0


jomaxx wrote:
Hosts file. Hosts file. Use the hosts file.

Good idea. Third good idea in the last two days. This forum is flowing with them!

Having said that, I don't know much about host files, but they are on the PC are they not? If so, this is useful in most but not all circumstances, I think.

I want to be able to see the ads from my computer (to monitor what appears). But guests have a separate logon to our network, so I presume that I can set up a separate hosts file for those that logon as guest, so that particular problem is solved.

But another problem (relevant for me this week) is the guest bringing their own laptop and connecting to my dsl modem/wireless network. The relevant hosts file is on the laptop, is it not? This isn't so much of a problem, because laptop-owning guests tend to be pretty computer-literate, but it would be good to find a more permanent solution and avoid having to go through the mini training course!

10:15 pm on Feb 13, 2006 (gmt 0)

Administrator from US 

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 25, 2005
posts:14648
votes: 94


See, this is a perk of condo life as I have a few neighbors that have insecure wireless networks running and I can just let the guests use those instead.

Like I'm giving out my WAN security codes to guests...

10:18 pm on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 25, 2005
posts:1019
votes: 0


Darn, I knew moving into a nice detached house with a bit of land was a mistake. And those owls keep me awake at night!
10:43 pm on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 1, 2004
posts:1258
votes: 0


And those owls keep me awake at night!

Now I know where my owls went! Send them back please.

Sorry for being OT, I'm just bored today and lacking caffeine.

10:52 pm on Feb 13, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Jan 14, 2006
posts:222
votes: 0


It looks like jdMorgan gave you the solution if you use apache... Unless it's an issue that you'ld have to edit every page you have adsense on.

The server side include he posted earlier will stop the adsense from being displayed to the ip address you don't want it displayed to.

But, I agree, we should be able to tell google which IP's not to count.

11:06 pm on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


> what is the maximum ip addresses I can ban with this script?

I wouldn't care to use this to exclude more than a handful of IP addresses... Maybe ten.

But you might get the results you want by excluding IP ranges, for example 192.168.0.1 - 192.168.0.255, by specifying only a partial address. In that way, you could exclude several entire blocks of addresses without making the code ugly and hard to maintain, and without too much code-bloat.

Jim

11:11 pm on Feb 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


21_blue,

Yes, the hosts file is on the individual PCs -- typically at C:\WINDOWS\SYSTEM32\DRIVERS\etc on an XP machine. As such it's not really a very good solution if you have people popping in and out with their own laptops. It's also a "per-computer" setting, and not a "per-user" setting. Instead of the "don't click ads" speech, you'd have to walk them through modifying their hosts file...

Jim