PDA

View Full Version : Protecting your adsense scripts



cit1
03-08-2008, 12:32 PM
I have seen a few of these around, does anyone have one they use or can recommend?

<3

rmk
03-08-2008, 12:45 PM
please elaborate

cit1
03-08-2008, 12:56 PM
I just seen a few scripts on thevault that were like "Adsense Protection Script," to protect against arbitrage

I would imagine the script would just be something after so many IP requests it stop serving the javascript to the page.. I am not sure how they worked exactly..

I guess I could write something in PHP that would do the same using sessions and pageloads..

rmk
03-08-2008, 01:02 PM
wait do you mean to protect against someone railing your ads making it look like clickfraud or what?

cit1
03-08-2008, 01:03 PM
Yeah

rmk
03-08-2008, 01:07 PM
oh that's not arbitrage that's joejobbing basically

cit1
03-08-2008, 01:15 PM
yase

awol
03-08-2008, 06:26 PM
I guess I could write something in PHP that would do the same using sessions and pageloads..


Unless I'm mistaken, don't you need special permission to access Google's adsense API? If so, I don't see how you could do it without a pretty elaborate javascript injection.

cit1
03-08-2008, 09:03 PM
Unless I'm mistaken, don't you need special permission to access Google's adsense API? If so, I don't see how you could do it without a pretty elaborate javascript injection.

Simple..

$count = 4; //Number of visits before quitting the ad display

$_SESSION[visit]++;

if ($_SESSION[visit] < $count) { echo adsense js code}

nox
03-08-2008, 10:54 PM
php classes itt

cit1
03-08-2008, 11:28 PM
php classes itt

I forgot session_start();

;P

I wonder if google adsense TOS would have any problem with this...any one?

Also, does cloaking content based on referer with adsense frowned on? I know search spider/google algo frowns on this for cloaking by UserAgent for obvious reasons, but this would be for delivering more relevant content/ads for the viewer of the page..

gza
03-08-2008, 11:38 PM
I wonder if google adsense TOS would have any problem with this...any one?
that should be fine, i see no reason why they would complain about something like that


Also, does cloaking content based on referer with adsense frowned on? I know search spider/google algo frowns on this for cloaking by UserAgent for obvious reasons, but this would be for delivering more relevant content/ads for the viewer of the page..
this one will get you banned though

cit1
03-09-2008, 12:22 AM
gza, care to elaborate why?

gza
03-09-2008, 12:24 AM
i guess it depends on what you're cloaking the ads from/to... it would be considered manipulating the ads though regardless

ry
03-09-2008, 12:29 AM
i guess it depends on what you're cloaking the ads from/to... it would be considered manipulating the ads though regardless

I may be wrong but I think he means manipulating the pages content based no referrer

gza
03-09-2008, 12:37 AM
i fucked with cloaking for a longgggg time with ypn & google

the main thing with google is they will have a human manually visit your site to verify the bots version of your site and also for compliance

i never confirmed this but what i think happens is that the adsense bot actually screen shots the site when it visits so if it looks grossly different when google employee #3221 visits the site then you'll get caught quick

if you do anything with google, id add hidden divs loaded up with keywords (it works)

ypn let you pretty much dictate what ads were displayed initially so there was no need to cloak until they started cracking down on the usage of the ad categories but yea i used to have fun with ypn until they got tired of my international traffic

cit1
03-09-2008, 12:47 AM
Cloaking has kind of gotten a bad rep in the SEO business, and I don't really mean it in its normal meaning of feeding GoogleBot different content..

Gza, what if I were to setup a script to check the referrer, and based on that, do a "301" to a seperate page.. This would seperate it from the standard cloaking multiple contents to the same page

gza
03-09-2008, 12:54 AM
yea i never did it for seo... just adsense, ypn, and the adwords quality score bot

are you wanting to cloak for a completely different set of ads? like a blog about the easter bunny displaying mortgage ads?

im sure you can do it and if you ever got caught just claim ignorance the first time

awol
03-09-2008, 06:31 AM
Simple..

$count = 4; //Number of visits before quitting the ad display

$_SESSION[visit]++;

if ($_SESSION[visit] < $count) { echo adsense js code}


I can understand blocking based on the # of clicks (which is what I thought you meant), but not based on the number of views or visits.

On a couple of my sites, I'm getting significantly more than 4 PV/V, so this wouldn't be a good way of preventing fraud, only reducing revenue.

Google does have a private API for AdSense, which you can use to track clicks per user and can actually intercept their clicks, but I'm pretty sure that you need special permission to access it.

cit1
03-09-2008, 10:15 AM
With whitehad sites 4 is pretty low, but with blackhat, which usually your PV/V is around 1-3..

The original protection script I would guess was a JS script that layed a blanket over the entire page, and knew were you were clicking on the page.. and with that, it could keep track of how many clicks a visitor did in the adsense area, then based on the number of clicks, stop sending the JS.. similar to how the PHP script above does I would imagine..but I dunno since I can't seem to find it anywhere! :/