When stepping foot onto the World Wide Web, the first goal is usually to
setup a Web page. The extent and complexity of that page will usually depend on
what needs are trying to be met, as well as what services need to be provided.
The services being provided could be as complex as a comprehensive e-commerce
site or as simple as providing pictures of your child’s birthday party.
Mirroring the importance of presenting your information on the Web is collecting
information from the people who are seeing your information, in order to justify
and analyze its effectiveness. This means that you will be able to identify how
many people are visiting your site as well as important information that can
affect the way you design a page (i.e. their browser preference and their
operating system). This can be especially helpful when optimizing a page for a
specific browser type.
Raw data can be gathered dynamically from a Web page and stored in a database
for study at a later point in time. From this data, statistics can be generated
in real time, and updated for every visitor – not just compiled at the end of a
month or the end of a year.
Furthermore, statistics can be used to justify additional funding. They can
show, for example, traffic improvement or page hit ratios.
This tutorial provides instruction for developing a statistics gathering and
analyzing system using PHP. Application scripts are based on a system running
PHP 4.0 or higher with some sort of database to store our data (we will be using
mySQL).