NetTracker lite: Wonderful Free Web Analytics
- Posted by Badi Jones on November 7th, 2005 - Comment on this Post »
If you are reading this, then you probably have your own website, and if you have your own website, then you probably use some kind of web analytics program.
I have been using 3 for the last few months:
AWStats, analog, and StatCounter.com. All three of them are good in their own way, but they always seem to leave me wanting more detail. Statcounter.com gives you good detail for human visitors, but you only get to see the current 100 pageloads worth of data.
Getting to the point, I believe I have found the free web analytics program that beats them all (by far). NetTracker lite is the name of this gem.
Stats are unbelievably detailed. Here’s an example:
I can click on the time frame I want to chekc out (Hour,Day, Week, Month, Quarter, or Year) => Marketing Analyis => Robot/Spider => Googlebot= >
I get a list of last visit, Number of page views (clickable), Number of Visits (clickable)
Click on the visits number > Get a complete list of pages visited by googlebot with: IP address, Entry page, Exit page, and more.
It gives the same kind of detail for Keywords, referers.
Remember, its totally free. Here’s a link to the demo.
Getting NetTracker lite working for 1and1 Log File Format
For those who use 1and1.com shared linux hosting, the script below should work right as is for you. If you use some other host, and don’t have the right log format for NetTracker Lite, and don’t have access to your httpd.conf (.htaccess wont work) , or whatever server config you use, you will have to make a regular expression that matches your log file format.
Instructions
Here’s what I did. (if this script is sloppy, its b/c its my first time working with python. And Its pretty cool btw)
1. Copy and paste this code in a text editor and save it as convertlogs.py (be really carefull with the indentation, because python uses indentation instead of brackets. Even getting things off by a space will make the thing blow up.)
#======convertlogs.py==============
#!/usr/bin/env python
import os, sys, re, time
os.path.basename(sys.argv[0])
#I used these date vars b/c its how my log files are named
now = time.localtime(time.time())
day = time.strftime(”%w”, now)
week = time.strftime(”%W”, now)
#week is a number 1-52
#Day was 0-6 where 0=sunday, This changes it from 1-7 where 7= sunday
if day == “0″:
day = “7″
dot=”.”
#put the full path to your logs in the infilename
infilename = “/FULL PATH TO YOUR LOGS/htdocs/logs/access.log.”+ week+dot+day
outfilename = “/FULL PATH TO CONVERTED NEW LOGS/htdocs/commonlogs/access.log.”+ week+dot+day
input_file = open(infilename)
output_file = open(outfilename, ‘w’)
#below is a regular expression (probably sloppy) to match my logformat.
#Unless you use 1and1.com shared linux hosting (cheap), you’ll have to make your own
regex = ‘([0-9][^ ]*)[ ]-[ ]-[ ](\[[^]]*])[ ](”[^"]*”)[ ]([^ ]*)[ ]([^ ]*)[ ]([^ ]*)[ ](”[^"]*”)[ ](”[^"]*”)[ ](”[^"]*”)’
#this re aranges the logformat to the right format, once again, you will have to figure
#this out
replace = “\\1 – - \\2 \\3 \\4 \\5 \\7 \\8 \\9 \\6″
for s in input_file:
output_file.write(re.sub(regex, replace, s))
input_file.close( )
input_file.close( )
#=====================
2. Next you’ll need to make a cron job
– ssh into your server account. Open your ssh program. Type somthing like:
ssh username@##########.onlinehome.us
- once in, enter:
crontab -e
- then press enter:
- Add this line:
59 23 * * * python $HOME/convertlogs.py
This line tells the cron program to run convertlogs.py every night at 11:59 pm.
- press ‘:wq’ (thats: colon w q) then hit enter
3. After that, NetTracker is easy to install.
- You’ll need to go into the control panel and give NetTracker ftp access to the directory you specified in convertlogs.py Thats this one –> (outfilename = “/FULL PATH TO CONVERTED NEW LOGS/htdocs/commonlogs/)
Good luck
If you enjoyed this post, make sure you subscribe to my RSS feed!
- Hits, Page Views, and Visits: Get Them Straight
- Nihuo Web Log Analyzer
- Processing Large Log Files
- Putting Alexa Rank to the Test
- View Public Stats for Thousands of Web Sites
- How Accurate is Alexa Rank?
- How Popular is Your Blog?
- Clicktracks Appetizer Review
- 1and1 Log File Format for NetTracker lite
- AWStats with 1and1.com
- Analog LOGFORMAT for 1and1.com
- NetTracker lite: Wonderful Free Web Analytics

Leave a Comment