I’m trying to program an advertisement system. But as you know fake clicks are a major problem for this type of project.
By fake clicks I mean click spam, proxy clicks etc.
How can I deal with fake clicks with php? Simply, looking for libraries or logic.
This can be a pretty complicated endeavour, but first, let’s consider some ways we can track a user:
IP address, generally reliable, but remember that in an office with 12 users, they can all be using the same IP address because they are sharing an internet connection.
Cookies. The user can set his browser to not accept cookies.
User agent. Very unreliable and can be easily change by the user.
My suggestion is to use all of the above and factor it into your algorithm. In addition, check the duration between clicks, for example, if you have 4 clicks to ads served to a user within a 2 minute window, then they are probably committing click fraud.
Gather a list of known proxies (there are sites that provide proxy lists) and don’t count any clicks from those sources.
Analyze your data over time to determine what sort of circumstances lead to fradulent clicks and dis allow those clicks.