|StatEye Website Statistics|
StatEye is free software and comes with ABSOLUTELY NO WARRANTY! For details please read the LICENSE.
Make sure your webserver meets the system requirements to run StatEye.
Create a temporary directory and unpack the file
stateyeversion.tar.gz in it using:
gzip -dc stateyeversion.tar.gz|tar -xvf - (on some systems:
tar -zxvf stateyeversion.tar.gz will work too).
In this temporary directory type perl setup.pl on the command line.
In many instances setup will provide you with the probable answer to a
question and the default answer (which are not necessarily the same if
you had a previous installation).
The default answer will be indicated between square brackets like this:
[y]. You simple hit
Enter to agree.
If you have a previous installation of StatEye and are installing in the same location, the setup program will copy your previous settings and use them as default.
Do you wish to run setup in advanced mode? (y/n) : [n]
You are first given the choice to run setup in standard or advanced mode. Advanced mode includes options for tracking searches on your site, tracking sales paths and a host of other optional settings. For simple websites on a properly setup server the standard option should be enough. You can always re-run setup in advanced mode later.
If you are upgrading StatEye you only need to run setup in standard mode, since all your settings will be preserved, only if you wish to actually change some advanced settings do you need to run the advanced mode.
What is the path your html files are in? (ex. /home/sites/domain/html/):
Enter the full path to where your HTML files are located. This is usually referred to as the web server's document root.
Do you have a separate cgi-bin directory? [y]
Some servers require cgi programs to be placed in a cgi-bin directory, while others require cgi programs to have a .cgi extension but can be placed anywhere. If you need to use a separate cgi-bin directory then certain scripts will have to be placed there, otherwise all scripts will be placed together in one subdiretory. If you can read more about the cgi extension in the StatEye user guide.
What is the path your cgi-bin files are in? (ex. /home/sites/domain/cgi-bin/):
If you answered yes to the previous question, you will be asked to enter the full path to where your CGI scripts are located.
Subdirectory in which to install StatEye:
The default directory is stateye and it is not recomended to change this.
Unless you have changed the subdirectory name in advanced mode, setup will now try to create a subdirectory named stateye in each of these two locations. If successful or if the directories already existed setup will proceed otherwise setup will stop to allow you to figure out the proper directories and make sure that you have the proper permissions.
Setup will now verify or create those directories:
Verifying or creating the StatEye directories:
Target directory /home/mysite/www/cgi-bin/stateye created.
Target directory /home/mysite/www/html/stateye created.
Do you wish to install the optional command line utilities? (y/n) : [y]
There are currently two command line tools, statincl and stattail. The first is to help you update your HTML files (more on that later) and the second will run a 'tail' on your log file. These utilities are not needed to run the StatEye application itself. If you enter 'y' the following question will now appear:
Enter a directory in your path for the command line utilities:
If you answered yes to the previous question setup needs to know where to place those command line utilities. Setup will make a guess as to what could be an appropriate location and present this to you between square brackets. If setup did not find anything appropriate or you would like to install it somewhere else, enter a different directory.
It is advisable that this directory be in your PATH.
For example to add ~/bin to your PATH in bash
edit .bash_profile to contain the line:
We need to locate some resources.
The setup program searches your system for the required resources. If all the resources have been located this question will be skipped, if you chose advanced mode the location of sendmail will be asked. If any resources cannot be found, setup will ask you to locate them.
The resources concerned are: Perl, your mail program (usually Sendmail), your C-compiler, your shell, gmake, sed, compress or gzip, zcat or gzip and /tmp.
Do you want to turn on setuid - a.k.a. the s-bit? (y/n)
If your webserver is not running suExec we recommend that you turn on setuid (the s-bit). If your webserver is running suExec you should not turn setuid on as suExec would prevent the script from running and give 500 Server Error messages. In that case re-run the setup script and turn off setuid.
Note that if you turn setuid off while you don't have suExec running, you will get into problems with the ownership and permissions of the log files. So you need to either have suExec or turn setuid on but not both. You can read more details in the userguide.
Your website's name for use in your reports.
The name you give to your website, which is to be shown in your website traffic reports. Use only alphanumeric characters, underscores, minus signs, spaces and periods.
Your domain name in lowercase (for setting cookies)
Enter your so-called cookie-domain in lowercase. The cookies you set will be sent to all sites in that domain. If your website is located at www.yourdomain.com your cookie-domain should be yourdomain.com. Most websites have both the names with and without 'www' enabled. Any cookie set for the www site alone will not be sent to the yourdomain.com site unless you set your cookie-domain as described. Similarly if you have two subdomains, subone.yourdomain.com and subtwo.yourdomain.com, and you want StatEye to measure both subdomains as one site you should also set the cookie domain to yourdomain.com. However if you want to treat them as two separate sites you need to set the cookie domain on each to include the subdomain (ex. subxxx.yourdomain.com). It is also preferable to to set your domain name in lowercase letters only.
E-mail address(es) of recipient(s) of the reports:
Enter the E-mail address(es) where you would like to receive your reports. Multiple addresses must be comma-separated. E-mails will appear to come from the first e-mail address in the list (unless modified in advanced mode).
Q Advanced: Advanced settings.
In advanced mode several questions will now be asked, if you do not understand what a question is about, leave the default setting, because this will be either an acceptable setting or one that does no harm.
These settings are explained in detail in the user guide. The following settings can be changed:
Ready for installation of StatEye in the following directories:
CGI : /home/mysite/www/cgi-bin/stateye
HTML : /home/mysite/www/stateye
BIN : /home/mysite/bin
Proceed with the installation of StatEye? (y/n) [y]
The directories that you entered in the first few questions will now be shown with the subdirectory for StatEye in which the software will be installed. If you are happy with it you can proceed with the installation.
Setup will start to install the software and display which files it is installing.
After completion the message
Setup completed successfully! should appear.
The software has been installed.
Provide feedback? (y/n) : [y]
This is an entirely optional step, you have no obligation whatsoever to send feedback or to sign up for notifications. If you do not feel comfortable answering certain questions you can leave the answers blank.
Please take a minute to answer a few simple questions and allow the setup program to send some information about the setup process. It will help the future development of StatEye. You can also choose be notified of future releases and updates.
The questions setup feedback will ask you are:
Feedback will also collect some information about your system to help improve the setup process in future versions. It will try to determine what kind of operating system you are running and where certain resources are located. It will not collect information (like IP numbers or userids) that could be used to identify you or your site. The information is used to help us improve future versions of StatEye. For example we may have overlooked that a certain resource goes by another name on your system or is located in different directory. But also we would like to know what options are often changed from their default setting (and maybe change the default in future releases).
Unless you sign up for notifications of new releases and updates or join the newsgroup (see next questions) you will never receive any e-mail from us, not even a confirmation of reception. Unless of course you specifically asked for a reply in your comment. However the feedback e-mails are only processed from time to time so if you really want to ask a question it is better to visit our support page.
Would you like to be notified by e-mail of
future releases or updates via StatEye-Announce on Google Groups? (y/n)
You can sign up to our notifications group and be notified of future releases or important changes. If you do not want to sign up during the setup process you can always sign-up later via our support page.
Would you like to join the StatEye newsgroup on Google Groups? (y/n)
You can join our newsgroup on Google Groups to discuss installation, bugs, features, etc... If you do not want to sign up during the setup process you can always sign-up later via our support page.
If you do sign up for notifications of new releases, you will be able to remove yourself from the list and be reminded of this possibility in update notifications that you may receive.
If this is the first time that you are installing StatEye you will need to add 3 cronjobs to your crontab and include a few lines of HTML into your webpages. If you upgraded StatEye or are reinstalling the software (in the same location) you probably have already installed the cronjobs and updated your HTML pages before. If that is the case no further action is required.
Do you wish to generate the lines for your crontab? (y/n) [y]
Setup will generate the lines that you should add to your crontab for the reports to be generated every night and month. We have left the installation of the crontab to you as it is a sensitive operation, you can simply copy and paste the given lines into the crontab (using crontab -e to edit the crontab) adapting the times to suit your particular needs.
The 3 cronjobs that need to run are (followed by a suggested time):
./statcron.pl mail day -1(at 00:05 every day) to mail yesterday's report.
./statcron.pl mail month -1(at 01:45 on the 1st of every month) to mail last month's report.
./statcron.pl archive month -1(at 04:05 on the 4th of every month) to archive (compress) the logs of the previous month.
nice' these cronjobs in order to give them a lower priority. The generated crontab lines include this feature. A copy of the generated lines for you crontab will be kept in the file crontab.txt in the current directory (the directory from where you have been installing StatEye).
You need to measure the traffic to your website by including the following code in all of your HTML pages (a copy of this has been installed below your website document root at /stateye/stateye.incl):
<!-- stateye.gif (http://www.stateye.com/) -->
<noscript><img src="/cgi-bin/stateye/stateye.gif?docloc=referer&docref=noscript" width="1" height="1" alt="" style="margin:0;border:0;padding:0;display:block;" /></noscript>
<!-- end stateye.gif -->
A script is provided to make those updates to your pages (see next section).
If stateye.js is loaded at the end of a very large page, for example one including many pictures, stateye.js might not load before the user moves on to the next page, hence it is advisable to place stateye.js as soon after the <body> tag as possible.
Included in the release is a small script, called
that will update a file with the stateye.js code shown above.
If you chose to install the optional command line utilities
you should be able to call this script as follows:
statincl page1.html page2.html etc..
If you did not install the optional command line utilities, simply copy statincl into a directory that is in your PATH, you may need to edit the file and set the variables $htmltarget to its correct value. Or re-run setup and install the command line options.
Read more about statincl in the user guide.
statincl make a full backup of your site.
This script changes your pages and may do things you did not want to do.
It is also wise to first test it on copies of your files, before
placing the updated files onto your real site.
For more information on the possibilities of StatEye, how to get your website traffic reports and how to tune the software to your specific needs, read the User Guide.