How can I collect stats from different websites in one central place?

2011-10-05 09:52:46Tags: websites,stats
I own many websites on different servers, but want to collect stats in one central place. How can I do it ?


This can be done in 2 different ways. This first method described here is recommended as the easiest to implement if you are not too tech savvy.

1. Using Javascript data collection

In your Logaholic, simply create a profile for each website you want to track. Make sure the data collection method is set to javascript. Now Save the profile first. Next, download the logaholic.php tracking file from the Logaholic profile screen and copy it to the web root directory of the website you want to track. Finally, copy the javascript tracking code from the Logaholic profile screen and paste it into the html pages on the website you want to track.

Important: The logaholic.php file will connect back to the database server that contains your Logaholic information. So, make sure you use a fully qualified hostname (i.e not just 'localhost') as the database server name in your Logaholic database configuration settings (Check Global Settings to change this if necessary, or edit the logaholic.php file manually). Some database servers won't allow connections from a different machine. In that case, please read this work around.

2. Using FTP to Transfer Log Files

In your Logaholic, create a profile for each website you want to track. Next, you'll need to copy (ftp) the log files from your different servers to the server Logaholic is installed on. Simply configure your profiles to read the copied log files on the local machine. Of course, the catch is that you will need to copy the most recent log file data each time you want to update your statistics, so you will probably want to automate this in some way.

Alternatively, you can use Logaholic's built in FTP mode (use the FTP Download method on the Data Collection tab). This will automatically transfer the most recent log data and keep a local copy of the log file. However, Logaholic's FTP mode currently only accepts a single log file per profile, so if your web host automatically archives your log data into more than one file, you will get holes in your reporting if you don't update your stats in Logaholic on time. To avoid that from happening, make sure you automate Logaholic updates and let it run before your web host rotates/archives your log files.

- Ftp will only work if your PHP is equipped with FTP functions (version 5+). - Version 2.7.6 and Earlier supports single log files copy only through built in FTP client.. Need to copy "multiple log files" on Logaholic version 2.7.6 or earlier: Use a Ftp client supporting Automated Ftp/copying. Many Ftp clients are found on the Internet; free or under commercial license. Scripting .bat files etc is an alternative option but beyond the scope of this manual. - As of version 2.7.7+ Logaholic supports copying multiple log files. See for instructions "Data Collection" Tab of "Edit Profile" screen.
The information on this page relates to older Logaholic versions (prior to Logaholic 6) and may be outdated.