Forum Moderators: DixonJones
I don't need anything complex and my only requirement is that it leaves a record in the log file.
Any ideas or suggestions on where to look would be great. I've been researching this for a couple of days now and haven't found anything that works.
Thanks, Anna
<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>
[edited by: tedster at 4:39 pm (utc) on April 18, 2005]
There are two ways to go - one that would make use of the Javascript "onClick" event to make a request that logs to your server, the other that runs a script on your server that then redirects the browser to the final destination. The Javascript method will work as long as your visitors don't disable javascript, while the redirect will not look pretty in the status bar.
Cosmetics aside, both methods work well, and it depends upon where you want to put your efforts. I'd be glad to offer help you with scripts, but you need to tell us if you want to use a server script (PHP, PERL, ASP, etc.) or on the client side (Javascript).
Larry
I found a couple onclick solutions while I was researching this but didn't find anything that worked for me.
Also, all the Link tracking scripts that I found didn't push anything to the log files. They instead stored the data in a separate file which doesn't work.
Hope that gives you a little more information.
Thanks,
Anna
<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>
[edited by: tedster at 4:40 pm (utc) on April 18, 2005]
Anna
It's free for a week and then you have to pay - I suppose one could hack something like this together themselves if they know enough JS, and with all of these new remote scripting libraries out there, one could do some great user tracking beyond just exit clicks, but that's another story...
How about this... If I create a popunder that automatically closes itself? The popunder would load an html page that has the tracking code I need to hit the log files. Any forseen problems here? Is that easy to implement on a page with tons of links?
Another thing I tried was to have the link open in a new window and to have the original page link to an anchor on the page. I couldn't get this to show up in the logs though. I'm sure I didn't so something correctly or my stats software is blocking the results. Any ideas on how to get that to work?
Anna
Use sessions to track the user through the site. Give each user a unique ID, reporting the path back to a database, and then use the techniques employed by the link I provided above to insert the exit link into the DB.
There are some possible holes that I can think of, but someone who knows remote scripting/Ajax techniques should be able to make it work.
This wouldn't be 100% accurate, but user tracking never is.