Capturing Data to a text file

This seems like a better fit for an analytics tool -- here's a guide for Google Analytics:

Here's a way to use PHP to get simple analytics: Button with counter - #6 by Daniel (and that thread has more ideas)