Website Management
The first part of managing your website is knowing what's going on. Most webhosting deals come with weblog analysers which tell you all about your visitors - when, how many, where... sometimes even how they found you (the referrer).
There are lots of free scripts to analyse weblogs, and lots of commercial services too.
You can create your own personalised stats page. This is essential is your running a member's website because this gives you your own method of tracking your visitors.
The Stats Page
Included in the examples is stats.php - this is the basic dynamic website statistics page. When you go to this page, it'll list the following:
- The time & date.
- Orders - the details of all the orders received.
- Hits - the number of hits on each web page.
- Downloads - the number of times each file was downloaded.
You can put this page in a password-protected directory, but if there are no links to it in your web pages, then it's fairly safe from being discovered by your customers.
It will need to be customised to your specifications. It's very simple, and can easily be modified from the example given. Each section of PHP code is basically the same, and does the following tasks:
- Create an HTML table.
- Send a query to the database.
- Read the results of the query.
- Write the query results into the HTML table.
- Close the HTML table.
As each line (row) of the results comes back from the database, the script simply writes each data item out into a new cell in the table.
If you have a different structure for your orders table from the examples, you'll need to edit stats.php so that your data is correctly displayed on the page. This is usually a simple job of just adding or rearranging a few columns in the query, and the table definition.
If you're not tracking page hits, or file downloads, you can delete these sections from the page. Equally, if you have other data (e.g. a guest book) you want to display, you can copy the orders section and modify it to display your data.
To see the stats for TWB click here.
|