Closed (fixed)
Project:
Google AdSense integration
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2007 at 17:03 UTC
Updated:
14 Apr 2009 at 15:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
jcnventuraThis is actually a desirable feature not yet present in the new version.
Comment #2
preventingchaos commentedAt a glance, it looks like this patch is all that's needed for this. Note: I didn't test the patch.
Comment #3
kbahey commentedSetting it to code needs review so others can test it.
Comment #4
jcnventuraNow that I am looking at it, wouldn't a simple compare between the current user's publisher ID and the value of $client do exactly the same, avoiding the need to mess with the referral code?
Also, it's a lot easier to understand the objective by comparing the publisher IDs... And more robust due to the fact that a user could try to create different logins, and use one as 'author' and another as 'ad clicker'. The uid check wouldn't catch those cases, but the publisher ID would..
João
Comment #5
preventingchaos commentedSomething like this, just before the
returnstatement inrevenue_sharing_basic_choose_client($format)?It's definitely simpler than my earlier patch, and at least as effective. It still doesn't prevent click fraud entirely (I don't think that's possible, anyway).
Comment #6
jcnventuraYes, that would be the idea. It's a lot simpler and I am pretty sure it works, just by looking at it.
Have you tested it?
João
PS: Reading back my #4 comment, the 'ad clicker' user would have to be a bit dumb to actually provide it's real publisher ID. However, I can imagine situations where a group of friends share the same publisher ID or something similar, that checking for ID would not prevent. In other words, if the code is meant to prevent the current user's publisher ID from being shown, the check should be this one.
Comment #7
preventingchaos commentedNo, I haven't tested it.
Comment #8
jcnventuraHi,
I have tested the above and it works, so I committed it to CVS. Please test the dev in a few hours.
João