I would just use a db and then create a table that had four columns.
clicks
id : bigint ->auto_increment
page : varchar(255)
ip : varchar(20)
clicked : timestamp
primary key (id)
index page
index ip
index clicked
Then just create a php script like this:
<?php
/*connect to the database or ensure that you are connected*/
$file = explode('/',$_SERVER['FILE_NAME'];
$file = $file[(count($file)-1)];
$sql = "INSERT INTO clicks (page,ip) VALUES (";
$sql .= '"' . $file . '",';
$sql .= '"' . $_SERVER['REMOTE_ADDR'] . '")';
mysql_query($sql);
?>
Then just include this file in all your other pages and you're click tracking like a mad man. The reason I also grab IP is so that you can expound upon the reports generated and see what paths people are following through the site. You may also wnat to grab the referrer so you can get an idea what pages people are originally coming to your site through.