Forum Moderators: martinibuster

Message Too Old, No Replies

How to Disable Ads for Own IP & Local Geographic Region

To Avoid Click Fraud

         

thvi

12:40 pm on Apr 21, 2005 (gmt 0)

10+ Year Member



I read that one way to cut down on possible click fraud is to:

Disable ads for your own ip and local geographic region, if you have access to that data and it won't hurt your business.

Is this easily done?

Many thanks,

thvi

BeeDeeDubbleU

1:34 pm on Apr 21, 2005 (gmt 0)

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



That would go a long way to provide a measure of security. I would also be interested to hear if there is anything available to do this.

jomaxx

2:24 pm on Apr 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need programming to do this - PHP or Perl or whatever is available to you. It's easy enough to block specific IP's, but for true geo(un)targeting I think the program you are looking for is GeoIP.

However, IMO this is not necessary. Once you get to the point where you're cutting back your AdSense income to protect yourself from phantom risks, you've been reading too many paranoid ramblings. The only thing I would recommend is disabling AdSense access to any other PC's you have in your home. This is easily done, and with 2 non-work PC's in my house, it's one less thing for me to worry about.

You can do this via the Windows hosts file; the location varies, but on my PC it's in \windows\system32\drivers\etc. To prevent the PC from showing AdSense ads, add this line to the bottom.

127.0.0.1 pagead2.googlesyndication.com

Webwork

2:37 pm on Apr 21, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Jomaxx, when I drill down into System32 I do get to a "hosts" file, which when I open it in Notepad I find this:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
127.0.0.1 pagead2.googlesyndication.com

Jomaxx - IF all I do is add to the host file, which is a subfile of the etc file the line that appears bolded above this will "do the trick"?

What if the other PCs in the house are connected via a wireless router? Same setting, same outcome?

Thanks. I owe you a cold frosty one. ;0)

BeeDeeDubbleU

3:01 pm on Apr 21, 2005 (gmt 0)

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



I am surprised that Google don't offer something that could do this. Googleguy?

jomaxx

3:07 pm on Apr 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Webwork, that looks right, but of course you should test it. Add the line and make sure the ads don't appear. I'd make sure to close your browser and re-open it, but I don't think rebooting is necessary. You need to do this to each computer for which AdSense should be invisible.

Webwork

3:23 pm on Apr 21, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Coupon from Webwork good for 1 cold frosty beer for jomaxx

Or, should I type [beer]Coupon[/beer] OR is it [coupon]Beer[/coupon]?

[edited by: Webwork at 3:42 pm (utc) on April 21, 2005]

Roadkill

3:38 pm on Apr 21, 2005 (gmt 0)

10+ Year Member



The above method works great. I have a dual boot sys and did it to one them. Thanks for the info

GuluGulu

4:17 pm on Apr 21, 2005 (gmt 0)

10+ Year Member



127.0.0.1 pagead2.googlesyndication.com

Will putting this line into the host file would be against TOS?

The above modification will also cease displaying G ads on other publisher's site too.

jomaxx

5:46 pm on Apr 21, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's correct. What part of the TOS do you feel might be relevant?

burntan

7:50 am on Apr 22, 2005 (gmt 0)

10+ Year Member



The above modification will also cease displaying G ads on other publisher's site too.

Yes, putting that in your host file will prevent you to view other sites Google ads as well.

Can I use a PHP or ASP script to choose to include Adsense script or not in my pages depand on visitors IP? Will that against TOS?

burntan

7:58 am on Apr 22, 2005 (gmt 0)

10+ Year Member



I mean, let say my own IP is 192.168.2.18 can I add the following ASP script to my pages to disable display Adsense ads when I browse to it with my IP?

<%
If Not Request.ServerVariables("Remote_Addr")="192.168.2.18" Then
%>
<script type="text/javascript"><!--
google_ad_client = "pub-9999999999999999";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_channel ="";
google_color_border = "FFFFCC";
google_color_bg = "FFFFCC";
google_color_link = "990000";
google_color_url = "009999";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<%
End If
%>