VisitorLog
Realtime Visitor Logging & Statistics
VisitorLog is a web application that shows you who's on your website right now, and everyone who has visited before. It logs all your visitors and displays them for you in a constantly-updating LiveLog on a private password-protected page. It logs not only your visitors' hostnames & IP addresses, but lots of other useful information about them, like where they came from, how long they stayed, what they're looking at on your site, and more.
VisitorLog also includes a stats page which displays detailed breakdowns of your site's audience, showing you which browsers are most popular amongst your visitors, which pages are most popular, how many visitors you've had in each day/month/year, and much more.
VisitorLog will silently (invisibly) log all your visitors, but if you'd like, you can also choose to display a short Recent Visitors list, a daily-visitors graph, a visitors summary, or a box for your visitors to enter their names.
Contents
Download
Purchase
Instructions: Apache on Mac/Linux/BSD
Instructions: Apache on Windows
Instructions: IIS on Windows
FAQ
Support
Changelog
Download
You can download the trial version of VisitorLog and install it on your server right now. The trial version is like the full version but with a few limitations and disabled features: no stats page, no password protection, and it only shows 3 days' worth of visitors.
Purchase
To get the full version of VisitorLog, please choose your license type below.
VisitorLog Full Version: |
||
---|---|---|
Personal Website License: 1-site |
$19.99 |
|
Non-Personal Website License: 1-site |
$39.99 |
|
Non-Personal Website License: 3-site |
$89.99 |
|
Non-Personal Website License: 10-site |
$249.99 |
|
Instant credit card payments through PayPal. No sign-up required! |
Note: a Non-Personal Site is one that is commercial, academic, organizational, community, government, etc.
Standard install: within 2 business days |
$39.99 |
|
Rush install: within 24 hours, even on weekends |
$79.99 |
Quick Instructions for Most Servers (Apache on Linux, Mac OS X, BSD)
Most servers already have MySQL installed, but if yours doesn't, then download and install the free MySQL Community Server, and then create a database and a MySQL user account.
Unzip your visitors.zip (or visitors-trial.zip) file, then upload the contents of the www.example.com folder onto your website. Then visit the following address, replacing example.com with your own domain name:
If you see a message about adjusting database prefs, then VisitorLog is working properly. Edit your /cgi-bin/visitors_prefs.cgi file to set those prefs.
Add this line to the <head> section of each page on your website that you want to log (or, if your webpage creator/editor doesn't let you adjust that section, you can usually just put this anywhere within your page):
Now you can view VisitorLog's LiveLog page, showing all your visitors:
Now be sure to read the FAQ, and if all else fails, try the full instructions.
Quick Instructions for Apache-on-Windows Servers
If your server doesn't already have Perl installed, download and install the free ActivePerl. You may need to reboot after installing it. Open a command prompt and type perl -v and if you get some output about Perl and its version info, you should be all set.
If you had to install Perl, you'll also need to install the DBD::MySQL Perl module (and probably the MIME::Lite module) by opening the Run dialog or a command prompt and then typing ppm install DBD-mysql (and then ppm install MIME-Lite). Or you can run just the ppm command by itself to use the graphical installer.
Now follow the regular Apache instructions.
Quick Instructions for IIS-on-Windows Servers
If your server doesn't already have Perl installed, download and install the free ActivePerl. You may need to reboot after installing it. Open a command prompt and type perl -v and if you get some output about Perl and its version info, you should be all set.
If you had to install Perl, you'll also need to install the DBD::MySQL Perl module (and probably the MIME::Lite module) by opening the Run dialog or a command prompt and then typing ppm install DBD-mysql (and then ppm install MIME-Lite). Or you can run just the ppm command by itself to use the graphical installer.
If your server doesn't already have MySQL installed, download and install the free MySQL Community Server. Once it's installed, create a database and a MySQL user account.
Unzip your visitors.zip (or visitors-trial.zip) file, then open the www.example.com folder and move the contents of the cgi-bin folder into the visitors folder. Then delete the cgi-bin folder. Upload the "visitors" folder onto your website, then visit the following address, replacing example.com with your own domain name:
If you see a message about adjusting database prefs, then VisitorLog is working properly. Edit your /visitors/visitors_prefs.cgi file to set those prefs.
Edit your /visitors/js/vlog.js file and change the script_name variable, near the top, from "/cgi-bin/visitors.cgi" to "/visitors/visitors.cgi". Then add this line to the <head> section of each page on your website that you want to log (or, if your webpage creator/editor doesn't let you adjust that section, you can usually just put this anywhere within your page):
Now you can view VisitorLog's LiveLog page, showing all your visitors:
Now be sure to read the FAQ, and if all else fails, try the full instructions.
Full Instructions for Most Servers (Apache on Linux, Mac OS X, BSD)
Note I: Do not edit the visitors.cgi file unless absolutely necessary; instead, edit visitors_prefs.cgi for all your customizations.
Note II: if you are using Windows on your desktop, and when you open the *.cgi file, the lines all appear to be crunched together, try opening it in Wordpad (not Word) instead. In Wordpad, save the file; this should fix the line-endings so the file's contents appear correctly in other editors like Notepad.
On your website:
- First, complete the quick instructions.
- Set the permissions on /cgi-bin/visitors.cgi (aka, chmod it) to world-readable and world-executable, that is, a+rx or mode 0755. Do NOT use 0777.
- Set the permissions on the /cgi-bin/encdata/ directory to world-readable, -writable, and -executable, that is, a+rwx or mode 0777; do the same for the /visitors/appdata/ directory.
- In your browser, go to yoursite.com/cgi-bin/visitors.cgi and follow the brief instructions that it gives you. (It will instruct you to set the database options in visitors_prefs.cgi.)
- If you get an Internal Server Error, it's most likely a permissions problem. See this page for more details.
- Read the FAQ.
VisitorLog is now installed and logging visitors for you. To view VisitorLog's LiveLog and see who's on your site in realtime, go to yoursite.com/cgi-bin/visitors.cgi?mode=full. And to see the statistics for your visitors, go to yoursite.com/cgi-bin/visitors.cgi?mode=stats.
Full Instructions for Apache-on-Windows Servers
Note I: Do not edit the visitors.cgi file unless absolutely necessary; instead, edit visitors_prefs.cgi for all your customizations.
Note II: if you are using Windows on your desktop, and when you open the *.cgi file, the lines all appear to be crunched together, try opening it in Wordpad (not Word) instead. In Wordpad, save the file; this should fix the line-endings so the file's contents appear correctly in other editors like Notepad.
On your website:
- First, complete the quick instructions.
- In your browser, go to yoursite.com/cgi-bin/visitors.cgi and follow the brief instructions that it gives you. (It will instruct you to set the database options in visitors_prefs.cgi.)
- If it doesn't execute or you get errors, you may need to change the first line of the visitors.cgi file from #!/usr/bin/perl to either #!perl or #!c:\path\to\perl.exe
- If it doesn't execute or you get errors, you may need to rename the script and its prefs file from a .cgi extension to a .pl extension.
- If you get errors about VisitorLog being unable to delete something from the encdata folder or the appdata folder, you may need to set a "Delete" bit on the folder's properties.
- Read the FAQ.
VisitorLog is now installed and logging visitors for you. To view VisitorLog's LiveLog and see who's on your site in realtime, go to yoursite.com/cgi-bin/visitors.cgi?mode=full. And to see the statistics for your visitors, go to yoursite.com/cgi-bin/visitors.cgi?mode=stats.
Full Instructions for IIS-on-Windows Servers
Note I: Do not edit the visitors.cgi file unless absolutely necessary; instead, edit visitors_prefs.cgi for all your customizations.
Note II: if you are using Windows on your desktop, and when you open the *.cgi file, the lines all appear to be crunched together, try opening it in Wordpad (not Word) instead. In Wordpad, save the file; this should fix the line-endings so the file's contents appear correctly in other editors like Notepad.
On your website:
- First, complete the quick instructions.
- In your browser, go to yoursite.com/visitors/visitors.cgi and follow the brief instructions that it gives you. (It will instruct you to set the database options in visitors_prefs.cgi.)
-
If it doesn't execute or you get errors, you may need to complete one or more
of the following steps (most are not necessary on most IIS servers, so try one at a time):
Rename the script and its prefs file from a .cgi extension to a .pl extension.
Change the first line of the visitors.cgi file from #!/usr/bin/perl to either #!perl or #!c:\path\to\perl.exe
For the /visitors/encdata folder, do the following: right-click on the folder, choose Properties, and go to the Security tab. Find or add the IUSR_computername account, and give it "Full Control". This account is sometimes called the Internet Guest Account. Then, do the same for the /visitors/appdata folder.
Run the inetmgr command and change the CGI web service extension from "prohibited" to "allowed". If your Web Service Extensions list doesn't include an item for Perl CGI scripts, then add a new one (named something like "Perl CGI", or "CGI Scripts", etc -- the name is not important), and for its "Required Files", enter C:\Perl\bin\perl.exe "%s" %s (adjust the path as necessary for your Perl installation)
Run the inetmgr command and right-click on the website and choose Properties. Go to the "Home Directory" tab, then to "Application Settings", and set "Execute permissions" to "Scripts and Executables".
Run the inetmgr command and go to "Application Settings" then "Configuration", and add an application extension for .cgi (and .pl) with the executable set to: C:\Perl\bin\perl.exe "%s" %s (adjust the path as necessary for your Perl installation)
Run the inetmgr command and right-click Default Web Site (or your site's name, if different). Then click New -> Virtual Directory and follow the prompts, entering "visitors" as the name of the virtual directory, and choosing VisitorLog's visitors folder (c:\inetpub\wwwroot\visitors\ by default) for the path. For Access Permissions, check (enable) the Read, Run Scripts, and Execute boxes. When finished, right-click the new virtual directory and choose Properties -> Application Configuration -> Mappings, and make sure there's a .cgi (and/or .pl) extension there, mapped to the C:\Perl\bin\perl.exe "%s" %s command (or your server's path to perl.exe).
If you get errors about VisitorLog being unable to delete something from the encdata folder or the appdata folder, you may need to set a "Delete" bit on the folder's properties. - Read the FAQ.
VisitorLog is now installed and logging visitors for you. To view VisitorLog's LiveLog and see who's on your site in realtime, go to yoursite.com/visitors/visitors.cgi?mode=full. And to see the statistics for your visitors, go to yoursite.com/visitors/visitors.cgi?mode=stats.
Optional Features
-
To display a graph of your visitors:
Add one of these lines wherever you want the graph to go:
If your page is a PHP page:
<?PHP virtual("/visitors/appdata/cached_output/graph.html"); ?>
If your page is PHP, but your server doesn't support virtual():
<?PHP include($_SERVER['DOCUMENT_ROOT'] . "/visitors/appdata/cached_output/graph.html"); ?>
If your page is an .html page, you can rename it to .shtml and then use:
<!--#include virtual="/visitors/appdata/cached_output/graph.html" --> -
Show a brief visitor summary:
Add one of these lines wherever you want the summary to go:
If your page is a PHP page:
<?PHP virtual("/visitors/appdata/cached_output/summary.html"); ?>
If your page is PHP, but your server doesn't support virtual():
<?PHP include($_SERVER['DOCUMENT_ROOT'] . "/visitors/appdata/cached_output/summary.html"); ?>
If your page is an .html page, you can rename it to .shtml and then use:
<!--#include virtual="/visitors/appdata/cached_output/summary.html" --> -
Show a list of recent visitors:
Add one of these lines wherever you want the list to go:
If your page is a PHP page:
<?PHP virtual("/visitors/appdata/cached_output/recent.html"); ?>
If your page is PHP, but your server doesn't support virtual():
<?PHP include($_SERVER['DOCUMENT_ROOT'] . "/visitors/appdata/cached_output/recent.html"); ?>
If your page is an .html page, you can rename it to .shtml and then use:
<!--#include virtual="/visitors/appdata/cached_output/recent.html" --> -
Allow visitors to enter their names: If you want to display a small box
for your visitors to enter their names, like this:
...then add one of these lines wherever you want the box to go:
PHP users:
<?PHP virtual("/cgi-bin/visitors.cgi?getname"); ?>
SSI/shtml users:
<!--#include virtual="/cgi-bin/visitors.cgi?getname" -->
And if you enable this box, then you'll probably also want to enable a "Logout" link somewhere on your page, with this:
PHP users:
<?PHP virtual("/cgi-bin/visitors.cgi?printLogoutLink"); ?>
SSI/shtml users:
<!--#include virtual="/cgi-bin/visitors.cgi?printLogoutLink" -->
Support
If you need any help with VisitorLog, please complete the following steps in order:
- Make sure you've followed the Installation Instructions.
- Be sure to read the FAQ.
- If you still need help, then contact us, and in your message, include the URL to VisitorLog on your server.
ChangeLog
v1.83 (20120810):
- New $PREF{enabled_output_widgets} setting to make it easier to have VisitorLog display all of your chosen stats mini-tables (e.g. recent visitors list, daily visitors graph, visitor summary) within your site's sidebar, footer, etc.
- Added templates for most output widgets and the full VisitorLog visitors log so you can fully customize those displays.
v1.82 (20110705):
- Changelog coming soon.
v1.81 (20110611):
- Changelog coming soon.
v1.80 (20110611):
- Changelog coming soon.
v1.79 (20101204):
- Changelog coming soon.
v1.78 (20090831):
- Changelog coming soon.
v1.77 (20090110):
- Changelog coming soon.
v1.76 (20081228):
- Changelog coming soon.
v1.75 (20081223):
- Changelog coming soon.
v1.74 (20081027):
- Changelog coming soon.
v1.73 (20080919):
- Changelog coming soon.
v1.72 (20080215):
- Changelog coming soon.
v1.71 (20080204):
- Changelog coming soon.
v1.70 (20071106):
- Changelog coming soon.
v1.69 (20070825):
- Changelog coming soon.
v1.68 (20070722):
- Improved the ignore_visitor options: you can now do multiple matches on a single field, and now HTTP_REFERER and REQUEST_URI are available to match against. Also improved the documentation for this feature quite a bit.
- Updated HTTP_USER_AGENT parsing to detect Safari running on the Apple iPhone.
- On the view-full-log page, we now always put the full user-agent into a tooltip that's displayed when you hover over the parsed/abbreviated one. (Previously we only did this for unknown UAs.)
- New option to allow VisitorLog to be fully functional even on lame servers that support neither PHP nor SSI/shtml.
v1.67 (20070717):
- Improved the default security of the database credentials.
- Improved the error message displayed when the db creds are missing; it now actually tells you what needs to be done instead of just pointing you towards the documentation.
v1.66 (20070618):
- Miscellaneous changes due to UserBase updates.
- Bugfix: all template variables are now of the form %%var%% instead of %var% as before, because %foo% is ambiguous within a template that may also contain a URL with hex-encoded portions.
v1.65 (20070606):
- Changed the query-string argument for the login action from "login" to "vllogin" so that sites running both VisitorLog and FileChucker but without UserBase won't get a double login prompt on a call to FileChucker which also includes VisitorLog.
v1.64 (20070418):
- Small markup change to aid in styling.
v1.63 (20070413):
- The output in ?mode=full can now be sorted by different columns besides date-of-visit, by passing ?orderby=foo.
- The search function can now search the entire visitor log including archive tables, not just the current past-7-days table.
- The search function now supports the logical AND operation within a single field via &&, i.e. google&&upload within the CameFrom field to find visitors who found you by searching google for "upload".
- The hits-graph feature can now display an arbitrary number of days instead of being fixed at 7 days, by passing ?numdays=N. It can also be instructed to use a different bar-width by passing ?barwidth=N.
- In delete mode, when a row is selected, it is now highlighted in a different color to indicate that.
- There is a new ?mode=dbmaint feature that allows you to easily remove duplicate records from your visitor tables (should only be necessary in the event of a server issue which affects your SQL tables).
v1.62 (20070329):
- We now display the output of the server's uptime command at the bottom of the page in ?mode=full.
v1.61 (20070328):
- Moved the main block to the bottom of the script, below the subroutines, as part of a larger effort to reduce the number of warnings logged when running in -w mode.
v1.60 (20070301):
- Changed the name of our username cookie when in non-UserBase mode, and a bunch of corresponding variables and query-string arguments, so as not to cause weird behavior on sites that might be non-UserBase and then add UserBase later (or vice-versa).
- We no longer print our own "authenticate yourself" page/form; instead, we just redirect to UserBase when appropriate.
v1.59 (20070228):
- Miscellaneous changes due to UserBase updates.
v1.58 (20070208):
- Miscellaneous changes due to UserBase updates.
v1.57 (20070208):
- Check for our prefs file in the current directory as well as in /cgi-bin/ and ../cgi-bin/.
- Applied some of our standard classes to form elements to make styling more consistent between applications.
- Miscellaneous changes due to UserBase updates.
v1.56 (20070131):
- Treat $ENV{PATH_INFO} and $ENV{SCRIPT_NAME} as case-insensitive, for brain-dead servers where the filesystem is case-insensitive and the awful server software changes the case of the variables at random.
v1.55 (20070127):
- Bugfix: a missing "qq" before a backtick caused a bunch of output to be null.
v1.54 (20070122):
- Try to get the CWD from $ENV{PATH_TRANSLATED} for brain-dead servers.
v1.53 (20070113):
- Updated to work with new version of UserBase, which is now database-backed.
v1.51 (20061210):
- Moved default install location from /cgi-bin/visitors/ to just /cgi-bin/ to make installation one step easier.
- Changed some of the AJAX code for regularly refreshing the visitorlog output in the browser.
- Added a new ?justsummary query-string option to display only an output like "Online 15 / Today 362 / Total 83,229".
- The AJAX calls now return proper XML, which increases the size of the output by a large percentage, but makes it "valid".
- Now when displaying the short list of recent or online visitors, the online visitors list is separated by line-breaks instead of commas. (Commas look a little nicer when the list is populated mostly by people's names, but when it's mostly hostnames and IPs, line breaks look better.)
- Improved screen-resolution-logging so it's logged much more consistently even for visitors who don't stick around very long.
v1.50 (20060905):
- First public release, after ~4 years of development & refinement on select client sites.