CNStats 2.1 Installation
Purpose
This software is designed for web-site statistics collection and analysis in on-line mode. A series of reports becomems available for a web-master right upon the installation, allowing to find out about the most popular pages, general information about web-site visitors, and choose optimal ways for the web-site development.
Installation:
- The downloaded distribution should be unpacked in the root directory of the web-server.
- It is necessary to run and follow instructions of the installation script. You may do this by going to the address: http://www.yoursite.com/cnstats/install.php
- After the installation procedure is over you will be given a configuration file code to be stored in the file 'cnstats/_vars.php'
- You will be also provided with a counter code to be stored in every page of your site.
Stats Collecting Code Installation
This is the last step of the installation procedure. CNStats supports two modes of statistics generation.
- Installation into the web-site core.
- Installation of a graphical counter.
Installation into the Web-site Core.
The counter is activated from the web-site core.
Advantages:
- All users are counted, even those, who turn off images in their browsers.
- Search robots are counted.
- No additional code is inserted in HTML page.
Disadvantages:
- The web-site core should be written on PHP.
- The counter code should be inserted at the very beginning of the page (necessary for cookies to work).
Installation:
To install the counter the following code should be inserted in every page of the web-site:
<?
include $HTTP_SERVER_VARS["DOCUMENT_ROOT"]."/cnstats/cnt.php";
?>
Installation of the Graphical Counter.
This is not the best variant of installation, but sometimes may be the only one.
Advantages:
- The web-site core may be written in any language, and the statistics collecting system may work on a different server.
- Attendance summary (total hits, hits today, hosts) may be displayed on the web-site pages by means of PNG images.
Disadvantages:
- Search robots and users, who turned images off in their browsers, are not counted.
- It is necessary to insert the counter code in HTML documents.
- Presence of the GD library is necessary if you use a visible image.
Installation:
The following parameters should be inserted in the '_vars.php' file:
1. Type of the counter
$COUNTER["type"]=1;
2. If the image is not transparent, the following three parameters define R,G, and B components of the symbols colour on the counter:
$COUNTER["inkR"]=1;
$COUNTER["inkG"]=1;
$COUNTER["inkB"]=1;
3. The following code should be inserted in all pages of the web-site:
<SCRIPT Language="JavaScript">
<!--
document.write("<img src='/cnstats/cntg.php?r="+escape(document.referrer)+
'&'+Math.random()+"' width=88 height=31 border=0>");
// -->
</SCRIPT>
<NOSCRIPT><img src="/cnstats/cntg.php?r=nojs" width="88" height="31"
border="0"></NOSCRIPT>
If the transparent GIF 1x1 is used, the highlighted with red text should be changed to "1"
Notes:
- Presence of GD library is not required if the transparent GIF 1x1 is used.
- It is possible to change the counter background. It is stored in the file cnstats/button.png.