Hit Counter

Results 1 to 3 of 3

Thread: Hit Counter

  1. #1
    Join Date
    Dec 1969
    Posts
    412

    Default Hit Counter

    Is there a way to create a hit counter in ASP? I read your article on creating a simple hit counter, but that won&#039t work for me. I need to track the number of users to the site (maybe to each page, not sure about that yet), for our metrics, and the metrics would not be correct if the counter resets every time the server reboots. Also, if possible, is there a way to keep the hit counter hidden from the user?<BR><BR>Thanks, you guys have been a great help as I try to teach myself ASP!

  2. #2
    Join Date
    Dec 1969
    Posts
    412

    Default RE: Hit Counter - I forgot to mention

    I forgot to mention our biggest limitation - for security purposes our web site is not on the web, it is on a WAN, so I can&#039t use any of those free hit counter scripts offered on the web.

  3. #3
    Join Date
    Dec 1969
    Posts
    190

    Default RE: Hit Counter - I forgot to mention

    There&#039s quite a few ways to do this. I&#039ve actually implemented it in such a way, that I include it on whatever page I want to track (for hits, real-time user tracking etc). You could simply have a database with a few fields, that you incremented everytime the page was accessed. Or, you could have an application variable that you incremented every time a new session was created. You can do this in the global.asa under Session_OnStart. Does this help at all? Were you looking for code? If you need anything further, you can e-mail me at cosgood@webzone.net.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •