Welcome to WebmasterWorld Guest from 54.166.114.43

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Tracking button/image

   
3:25 pm on Feb 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



is it easy to use php to track if some one clicks on of my images/buttons and them put this in a database?
6:20 pm on Feb 8, 2006 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Sure. But put what in the database?
5:02 pm on Feb 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i want to track if the button is clicked and then

input

random id
time
product
price

does that help?

5:31 pm on Feb 9, 2006 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



every link would have to go through a script then, might devalue internal links as they would all go to the same script except with a different id
5:55 pm on Feb 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thanks for the reply but that means nothing to me!
6:31 pm on Feb 9, 2006 (gmt 0)

5+ Year Member



for the button/image you should use a link like this:

track.php?productId=1
where productId=1 changes for each of your products (productId=2, productId=3, .....)

$randid = rand(0,100000); - generates rand number from 0 to 100000
using the productId you can query your products DB and get the product's price and store in variable $productPrice

Using such a query you can add all the data in your track DB
INSERT INTO track_table ('$randid', now(), '$productId', '$productPrice')

so if someone clicks on track.php?productId=1 it will write in your DB the ID=1, product price, current time and random ID

6:31 pm on Feb 9, 2006 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



well,

if you want to track every click you will need every link to go through a script that can insert the info into the db before you send them off to the desired page.

every link on your site will then go to this tracking script

have you looked into a log analyzer, maybe clicktracks, as that is probably a better option.

12:25 pm on Feb 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



excellent thanks for the great feedback i will look in to these options.

:)

5:07 pm on Feb 11, 2006 (gmt 0)

5+ Year Member



this way you may be able to track all clicks,
but be careful, its not that much bright idea if you consider SEO of the site.
giving all internal links the same page and that too not using the proper keywords will decrease its chances by a great deal.
-A
 

Featured Threads

Hot Threads This Week

Hot Threads This Month