Chapter 9. Web Site Statistics

People like to collect access statistics for different reasons. Perhaps you've been asked by a supervisor to prepare a report showing the traffic your company's web site receives, or maybe you're just curious yourself as to how many people are visiting. People like to see if their site is growing in popularity. Aside from satisfying curiosity though, statistics can be used to make informed business decisions as well. Such reports can be correlated against times when new promotions were rolled out and show whether visits increase because of them. They can even provide a snapshot of a site's state of health by showing how popular certain pages are compared to others in the site. Tracking can even be mandated by policy for a variety of reasons.

In this chapter, you'll collect and analyze page hits to generate a web site statistic report. Such reports can be used to better understand the effectiveness of a site and to make better business decisions.

Get PHP and MySQL®: Create-Modify-Reuse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.