header.jpg

Log2Stats Documentation

Setting up additional information about your visitors

There are two ways to let Log2Stats know about additional user information: from the query string of the specific resource or from the additional log files. Both methods will require to insert a small java script into your pages, additional log files will also require a server script to write those files.

Insert the code below into your html before the </body> tag. Change www.example.com/1.gif to the name of the resource on your web site. This resource should not be cacheable by browsers to ensure it will be requested from your server instead of cache. In most cases this resource should be a transparent 1x1 gif.

Click to show/hide code
Using query string

Go to Workspace Settings and add a new parsing filter. Set the name of the filter to something like "Additional parameters".
Add new condition:

  • Resource name equals

and put the name of the resource you used in the tracking script above (1.gif if you didn't changed it).

Add the following actions:

  • Set resource type to Other
  • Set logging strategy to Visit
  • Get additional parameters from query string

Click Save and move just created filter to the top of the list. Reparse log files to apply changes.

Using additional log files

This method allows you to log visitor identifier and other parameters for any resources (not just web pages). It still requires to insert tracking code above into your pages to detect screen resolutions or colors, but you can go without it if you just need to track visitor IDs.

Log2Stats uses W3C Extended format for additional log files. You can find field names and sample values in a small sample of such log:

#Software: l2s Web Logging Script
#Fields: date time c-ip c-userid cs-uri cs(Referer) c-language c-jscript c-java c-cookies c-screen c-colors
2010-10-13 07:01:23 1.2.3.4 e33cf0 http://example.com/uri.php http://example.org/ en-us 1.3 Y Y 1600x900 32

This log file should be generated by server-side scripts and imported into Log2Stats just like any other log file.