Updated referrer tracking code

This is an update to a previous post on simple referrer tracking. The original code is from justinsomnia.org.

I was playing around with the referrer tracking code I use here over the past few days, and made some minor adjustments: I use a DHTML slider to set the range of days over which to track, and I allow you to choose to get a count of the unique referrers or requests. There is a max limit of 365 days, but that is totally arbitrary. Maybe I shouldn’t have used a DHTML slider, but I thought it looked cool. I guess I could also change it so that “365” means “all days” too. But I won’t do that right now.

Only the referrer php code has changed. You can see it in action at http://fugutabetai.com/referrer2.php and you can get the code from http://fugutabetai.com/referrer2.txt (putting the code up like that probably isn’t a good idea, since I don’t like how the database.php is included in the file so obviously, but whatever.) You can get the original code with the Javascript for the logging from the justinsomnia.org link above. I don’t believe there are any possibilities for remote exploits since I make sure that the only user-settable parameter is a number. Anyway, thanks for the great JS code and the nice base for some fun referrer tracking. This does everything that I want for logging and is a hell of a lot easier than using a stats package for log parsing.

When I looked at some logging solutions, I was really surprised at how much referrer SPAM there was. This approach is much better from that point of view, except that users need to have JavaScript turned on for it to work.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *