You can build a serious analytics script that stores your traffic and collects data from any php site you install it on. Watch this series to learn all the things you can discover writing your own customizable php analytics program using php and mysql.
Visit http://lenfarneth.com for the code to build and deploy this.