View Full Version : Want to Create a Simple Stat Script

09-26-2003, 10:07 PM
There is a section of my company's intranet that I sometimes work on that I think is a total waste of time because I'm pretty sure that no one ever goes to look at the pages. There are no server logs or stats that I can access to see if I'm right or not. Can anyone think of way to write a javascript that will either send me an e-mail each time a link is clicked, or write to a text file each time a link is clicked? It should come from the onClick event. The platform is Microsoft IIS server. The server also runs ASP. Thanks!

09-26-2003, 11:47 PM
OK, I'm pretty new to ASP so I'm not sure if this code will work (haven't tested it either), it includes links to show/hide the counter.
It uses Session variables to keep track of whether to show/hide the counter and an Application variable to keep track of the count. At least that's the way it's supposed to work.

09-29-2003, 01:00 AM
Any good?

09-29-2003, 04:39 PM
The attachment came out garbled. Could you paste the script into a reply? Thanks for responding.

09-29-2003, 05:00 PM
IIS already has a logging feature. It logs all the requests received by the server. Open your IIS console and follow these steps:

Default Website->Properties->Web Site tab, check Enable Logging
Choolse W3C Extended Logi File Format, click Properties button, then you can specify the log file directory and log time period. In the Extended Properties tab, you can specify what information to log.

09-29-2003, 11:36 PM
I used WinZip to zip it, did you try to unzip it with WinZip? If you would prefer I will upload it again, but zipped with WinRar.
I can't do that right now though because I'm on a different computer to the one that I'm usually on.

Alternatively you could just glenngv's idea, I don't have IIS so I can't advise you either way on that issue.