There are many ways to track usage of a website. The simplest way is
with a hit counter. However, a hit counter will not give you an estimate
of how many unique user sessions were opened in your site. The code provided below is one of the simplest
session counters that can be made in .asp. A text document (session_count.txt) is
placed in the same directory (providing that directory has write access, you may
need to place the .txt document in your cgi-bin depending on your provider) as
the page we want the session counter to appear on. The .txt file is first read to
gain the value of the last session count, one is added to that number, written to
the .txt document, closed and the counter value is written as text to the
page. Refreshing the content of the output page will continually display
the last session number. In order for the number to increment you must
close all of your current browser sessions and re-visit the page or open another
browser.
|