..
Introduction
In several previous articles in the ASP section we saw how different types of counters based on database access, file-tense or XML documents.
What we achieve in this article is a system, a bit 'more complex, to monitor the traffic on a website, a simple script based on ASP and a Microsoft Access database.
Specifically, we will create a counter that identifies the traffic (divided into unique hits and page views) per day, month and year, and also a summary page that displays the traffic data for the current month (divided by day) and previous months.
For those who do not know the difference between unique hits and page views is that a single access is represented by a person who accesses a site and page views are the same pages that the user visits during the browsing session .
For example, if I go to the homepage centre-equestre-lepuy.com I created a single access and a page view. If I'm nice section ASP and I click on an article I created two more page views, but it's still only one single entry.
Overview Statistics
Just install the script that we called ASP Stats MRW (free download here ), the appearance of the display panel of the statistics is as follows:

Conversely, if there is data traffic, the appearance of the panel would be the following:

Database structure and application
We create the database file stats.mdb within which there will be counter to the table, accompanied by the following fields:
The ASP files we create, however, are as follows:
The CSS
Before moving to the ASP code, we create the style sheet for the application. Here's the code:
Body
{
background: # EEEEEE;
color: # 000000;
margin: 10px 0px 0px 10px;
}
th, td, p, input, select
{
font-size: 13px;
font-family: verdana;
}
th, tr.totale
{
background: # 000000;
color: # FFFFFF;
}
p form
{
margin: 0px 0px 0px 10px;
}
tr.bianco, td.errore
{
background: # FFFFFF;
}
td.errore
{
text-align: center;
}
tr.grigio
{
background: # CCCCCC;
}
Save the code in the file stats.css.
| |
ASP (Advanced)
Full course for creating dynamic Web sites. From 39 €. |
| |
ASP Zero (Ebook)
Learning Microsoft ASP and VBScript from scratch. At only 29 €. |
| |
ASP and Access (Ebook)
Managing a MS Access database with ASP. At only 29 €. |