Installation / Embedding as JS-code  

Embedding as JS-code

This is the simplest of methods to track your web site info. First, you should install ActiveStat's server part to some location. This site will be used to administer your statistics and get reports. Then you must embed the JavaScript code into your site pages:

1)Edit /stat/external/cut_n_paste.js:
  Change the "ssscript" variable so it points to the sss_main.php script in the Server Part:
ssscript = 'http://dedicated.site.with.stat/stat/sss_main.php';

Set the site ID variable (for the site to be tracked):
sssid = 1;

Correct the last line of the file accordingly in order to set site ID (replace SET_SITE_ID with value):
<img border="0" width="1" height="1" name="sss1811img" src="/stat/sss_main.php?sscm=1&ssjs=0&sssid=SET_SITE_ID&res=SET_PAGE_NAME">
2)Copy the file content and paste it inside each of the pages to be tracked (or your skeleton page) within the <body></body> tags. This code will produce a transparent 1x1 image.
  For each page define the "ssres" variable value ("res" parameter) to specify the page name.
ssres='first page';

Correct the last line accordingly so it defines the resource (page) name:
<img border="0" width="1" height="1" name="sss1811img" src="/stat/sss_main.php?sscm=1&ssjs=0&sssid=SET_SITE_ID&res=first%20page">

If you set the 'ssres' variable to '' (empty string), ActiveStat will store the document.referrer value as the page name. In this embedding type ActiveStat uses the following global JavaScript names (make sure you avoid conflicts between names in your scripts):

ssjs, ssres, ssscript, sssid, ssLogVisit(), ssInArray(), sslogres(), sstrlnk(lnk), document.sss1811img.