Forum Moderators: mack

Message Too Old, No Replies

Tracking hits on images.

Is it possible to track the number of times an image is selected?

         

maw4142

5:25 pm on May 9, 2005 (gmt 0)



I have a client who will have a web page that shows 6 images of High School seniors. This will be a contest. The picture that receives the most hits (votes) will receive a $100.00 cash prize.

I believe this will be set up something like this: each image will have a "mailto" code on it. When the viewer clicks on the image of a Senior an email will open where they can type in and send their email to the photographer. The photographer wants to collect email addresses for future marketing. But, they would rather not have to keep track of how many votes are accumulating for each picture. They'd rather this was tracked automatically.

Any ideas as how to approach this problem?

mack

9:54 pm on May 9, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You could use some form of click tracking script to record how many people click on each link.

with regards to the mailto. I would tend to avoid this. Try using a web script that sends it to your email address using the web server, as opposed to the users email client. This way they will not receive any security messages etc.

You could set it up like this. The user clicks a link. The click is tracked. They are them presented with a form.

Name:
Email:
Comments:

They click send and it is sent to the admin's email address.

I suggest taking a look through hotscripts.com or other script resource site and search for "click logger" "mail form".

Hope this gives you some ideas.

Mack.

kazecoder

2:56 pm on May 10, 2005 (gmt 0)

10+ Year Member



I have a similar system running on my website that tracks how many times a advertisement is clicked. This is very easy to do with php.

Point the URL of each photo to something like track.php?id= and use a unique id for each one that matches their table id number.

Track.php then parses the id number passed from the previous page and uses it in a SQL select statement to find the appropriate photo that was clicked. The statement would look like: "SELECT clicks from table where id = $id";

Then you run a second query to update the photo that was clicked and at that point redirect them with header ("Location: mailto:whoever@whereever.com");

All this sounds like a lot probably but its not really that bad.