Jump to content

Tracking Ad Clicks?


TJMAudio

Recommended Posts

I am making a web-based game, and as an incentive to clicking ads I have a script to give people some extra starter cash.  The only problem is, I don't know how to track people who clicked and submitted the advertisements.  Basically, the only advertisement I am running right now is one where they must go in, register, and be approved.  Could anyone (I don't expect people to hold my hand through it) give me some functions that would be useful, or a link to a tutorial, or just a quick snippet of sample code?

 

Thanks!

Link to comment
Share on other sites

Well, I'm sure you could edit an script to do this, you can find such scripts here.

 

You can keep track of users by logging their IP, and also placing an cookie in their browser.

Although both methods can be fooled, it's some of the best I can recommend.

You could have an table for the clicks, with id's to identify to which advertisement they are made to.

You can then make it time based, and add a time field to the table, and then working with that you can work out when they clicked and if they are allowed to click again.

 

I don't know if the following will work for you, because this is a feature before signup.

You could have them create an quick account, and then log it with account id's/names instead of depending on an IP or Cookie.

Link to comment
Share on other sites

They will be able to click the advertisement after their initial account activation, so they will be signed up for the site already.

 

Basically, I just want to make it so when the advertisement is completed and clears, the extra game money is credited to their account.

Link to comment
Share on other sites

  • 6 months later...

No, javascript won't completely do the job here.

You should use a database, as I suggested before.

 

Making an table to log the ad clicks, and checking the time and number of clicks.

Hey, I am still completely lost when it comes to this.

 

So I would use a table, which would be set up with fields like so:

 

| clickID (which would be auto_inc) | UserID (user who clicked it) | IP Address | AdLink | Date/Time |

 

The thing I am confused about is how I would automatically credit their account for clicking and actually FILLING OUT the advertisement.  I am scripting an online game and filling out ads (example, registering and bidding on an item on ebay), would give them extra starting money/items as a 'perk'. 

 

So, the problem I am coming across is how I would do this; the whole checking if they did it, then automatically crediting the UserID when it has processed.

 

Normally I would come here for more exact help, but to be honest I have no idea where to even start, so even advice there would be great.

Link to comment
Share on other sites

If you have acess to the URL, you could take it to another page first.

 

http://domain.com/clicked_ad.php?url={URL}

 

From that, i'm guessing you will be able to determind user details from their session or cookie, and save it into the db.

 

+-------------+-------------+

|  User ID      | URL            |

+-------------+-------------+

|  1              | http://....    |

+-------------+-------------+

Link to comment
Share on other sites

I am making a web-based game, and as an incentive to clicking ads I have a script to give people some extra starter cash.  The only problem is, I don't know how to track people who clicked and submitted the advertisements.  Basically, the only advertisement I am running right now is one where they must go in, register, and be approved.  Could anyone (I don't expect people to hold my hand through it) give me some functions that would be useful, or a link to a tutorial, or just a quick snippet of sample code?

 

Thanks!

 

use a simple mysql table like the one micmania posted

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.