Blue dot Installation Guide


Copyright (C) 1999-2003, Matti Tukiainen. All rights reserved.

This file is part of Blue dot.

Blue dot is distributed with NO WARRANTY OF ANY KIND. No author or distributor accepts any responsibility for the consequences of using it, or for whether it serves any particular purpose or works at all, unless he or she says so in writing. Refer to the GNU General Public License (the "License") for full details.


Table of Contents

Prerequisites

  1. A web site with the ability to run Perl CGI scripts.
  2. Zipped Blue dot distribution file bluedot-x.x.zip. New versions are occasionally available at: http://ktmatu.com/software/bluedot/.

Installation

  1. Unzip bluedot-x.x.zip to some directory.
  2. Change the first line of bluedot.pl (#!/...) to correspond the path where the perl interpreter is located.
  3. Configuration: Change the variable $LOG_DIR in bluedot.pl to point where you will place the log files on your server.
    $DEFAULT_TIME_ZONE, and $DEFAULT_DST_TIME_ZONE can also be edited if the time zone information is important.
    $ENABLE_REVERSE_DNS = 1 means that host names instead of IP addresses are logged (e.g. ml30pc3.uta.fi instead of 153.1.57.103). Setting this variable to 0 is slightly faster because there is no need to do reverse DNS.
    $ENABLE_COOKIE_LOG = 1 instructs Blue dot to store the values of PID (Persistent ID) and SID (Session ID) cookies to the end of each log entry. Blue dot sets a new session ID to every new session if this option is enabled. Session IDs can be used to detect unique visitors. Persistent ID should remain the same for a longer period and it can be used to count repeat visitors. Setting this variable to 0 makes Blue dot generated logs smaller and more compatible. N.B. The accuracy of Cookie based tracking reduces substantially if the site you are running Blue dot (e.g. example.com) is not the same as the site you are tracking (e.g. example.net). This is caused by the fact that many modern browsers block third party cookies. Browser settings and separate cookie blocking software also negatively affects the accuracy of cookie logging even if Blue dot and the tracked site are on the same domain. Cookie logging doesn't work if you are running Blue dot as a SSI script.
  4. Log in to the site, create a directory you specified above and chmod its permissions (attributes) to something like 700
  5. Copy an empty accesslog file to the log directory. Chmod its permissions to 600.
  6. Copy the bluedot.pl file into cgi-bin directory. Depending on how the server is configured chmod its permission to 705, 755 or something like that. Sometimes bluedot.pl must be renamed to bluedot.cgi .
  7. Test it! Modify this URL to reflect your site: http://www.example.com/cgi-bin/bluedot.pl?id=accesslog and give it to the browser. If everything goes well, there should be a tiny blue dot visible on the screen and the accesslog file contains information about the download.
  8. Add Blue dot code to web pages you want to log.

Add Blue dot code to web pages

CGI/JavaScript usage: Create a unique JavaScript snippet for each web page you want to log with Blue dot Code Generator, and insert these codes into web pages.

     or

Server Side Include (SSI) usage: Insert this kind of snippet into your pages:

<!--#include virtual="/cgi-bin/bluedot.pl?id=accesslog&ssi=1"-->

Web pages containing SSI must usually have a+x permissions to work correctly. Check these issues from your server's documentation.

SSI makes it possible to log search engine robot activity (like googlebot), but it cannot be used to do cookie logging. CGI/JavaScript cannot track robots, but it supports cookie logging.

Notes

It's possible to have an unlimited number of log files. Just remember to first create an empty log file and copy it into log directory. Information is written into bluedotlog file if the specified log file doesn't exist.

It's possible to use an user specified image instead of the default blue dot. Just specify the image's URL in Blue dot Code Generator.

Blue dot can also be used as a file download counter. First create a code snippet with the Code Generator, use a file to be downloaded as Image URL. Copy only what's inside of src="..." within noscript tags, and use it as a download URL.

On some browsers it's possible to completely hide the blue dot. Enclose the generated JavaScript snippet inside the construct shown below:

<div style="display: none;">
  ...
</div>