How To Hunt Down Click Fraud - Click fraud visitors are different
(Page 2 of 4 )
At this point there is something I want to point out. People that engage in click fraud simply click from the link on the pay per click link, go to your site, and leave. They aren't doing anything on your site, they aren't sticking around reading your page or visiting other pages. You can use this information to help
drastically narrow down any possible fraud.
To that end, it would probably be good to actually know HOW to get this done. In this article I'm going to avoid going into a specific programming language, but if you like, I will be happy to provide you with some PHP code to accomplish what will be discussed below. Simply leave a comment about this article and let me know you're interested.
For this you will want to create a simple four row table with whatever database your Web host uses (probably MySQL ... because of that I am going to assume this for how I describe the fields below). For this example we are going to call the table "fraudcheck," and the four rows will be:
FraudKey (double) auto increment primary key,
IPAddress (varchar 20),
AnotherPage char(3) (default to "no")
TimeDate (date)
Don't worry about the names of the rows, the meanings behind their names will become apparent in a moment.
To make the final code easier to understand, allow me to explain what will happen within the code itself.
At the very top of your page you want to check and see if the referer is one of the companies with which you have a pay per click account.
If it is, then capture the person's IP address and insert a new row into your table. All you need to insert is the IP address and the date and time. The FraudKey field and AnotherPage fields will take care of themselves.
Now, you'll need to read that record back out again because we're going to need that FraudKey to track a behavior of the user, namely whether or not they do anything else on the site besides enter the main page.
To do that, what you'll want to do is select all rows from the database where the IPAddress is equal to the one you just wrote...but you'll want to order the results by the FraudKey field in desending order. The first record in that result set will be the one you are after.
With that done (while it seems wordy, this would take place very fast, probably only about a hundredth of a second or so), you display the page to the user.
From here I won't be able to give you any code because it would wildly depend on exactly how your site is set up, but all that needs to be done is, if the user clicks on any link on your site, you are going to update the record containing the FraudKey field so that AnotherPage is now set to "yes."
Understand that at this point, all you have to do is, once a day, simply pull all rows from the table where AnotherPage is still "no." That will give you all users that visited your main page from the pay per click engine, but didn't do anything on your site, thus drastically narrowing down the amount of potential traffic you have to wade through.
Next: Finding the evidence >>
More Website Marketing Articles
More By Danny Wall