Average Daily Hits to ASP site

Results 1 to 4 of 4

Thread: Average Daily Hits to ASP site

  1. #1
    Sucheta Venkatraman Guest

    Default Average Daily Hits to ASP site

    Is there a way to keep track of average daily hits to my ASP site. This is for reporting purposes.<BR><BR>Thanks.....

  2. #2
    LeeAnnie Guest

    Default RE: Average Daily Hits to ASP site

    An easy way would be to set up a database table with three columns: autonumberID (always good programming to have autonumbers), Date, and VisitCounter.<BR><BR>Every time someone accesses your page, you would make a call to the database to increment the value in the VisitCounter.<BR><BR>How you detect a new visiter is up to you, but whenever they load your page, you can have asp code run:<BR><BR>if NewVisiter = true then<BR>&#039open connection to the database<BR>RS = conn.execute("SELECT * WHERE DATE = #"&date()&"#;")<BR>if RS.EOF then<BR>&#039add today&#039s date to the Date column<BR>else<BR>&#039increment the value in the VisitCounter column... something like:<BR>VisitNum = RS("VisitCounter")<BR>VisitNum = VisitNum+1<BR><BR>&#039then write that value back to the database<BR><BR>This way, you would have a table with a list of dates and a visit count will be right next to it.<BR><BR>I hope this helps, or at least gets you further than where you were. :o)<BR><BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Average Daily Hits to ASP site

    Keep in mind that while this method is simple, if you touch a database every time someone hits a page, then you may be stealing precious resources if traffic is high enough. <BR><BR>; )

  4. #4
    Ian Stallings Guest

    Default true true

    Here are some crazy ideas for monitoring traffic..<BR>Performance monitor<BR>IIS logs<BR><BR>Dont write a ASP file that uses ADO to connect to the DB and<BR>write every time a user hits the site. That is way to expensive<BR>for such little return. Use the features built into the website<BR>to monitor traffic. Use the IIS logs. They can track a tremendous<BR>amount of data. If you want to watch machine and site performance<BR>than use NT Performance Monitor. It can track everything related<BR>to performance on the machine, period. If you want to see how <BR>much memory a paticular process is using, you can do it.<BR><BR>I hope this helps. And remember, dont reinvent the wheel.<BR>Use your tools the best way possible. Explore all solutions<BR>and then determine the best fit for you. <BR><BR><BR><BR>

Posting Permissions

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