- Getting Stats for Multiple Websites
- Counting Page Parameters
- Get Stats for non-PHP Pages
- Get Stats for a Remote Website
- Install Multiple Instances of TraceWatch Web Stats
- Installing TraceWatch Web Stats on IIS Servers
- Installing TraceWatch Web Stats in a folder other than root
- Getting Stats for different folders as different websites
Getting Stats for Multiple Websites
- Most straightforward way to get stats for multiple websites is to follow the general installation instructions for each website.
- Alternatively you can install multiple instances of TraceWatch Web Stats on one website, use the Advance Code Generator to get code with alternative instance ID for your other websites and access all stats from one interface.
- You can also get merged stats for multiple websites by sending data from each website to the same TraceWatch instance, but one problem comes up here, pages with the same paths on different websites will be counted as one page: www.somewebsite.com/somefile.php and www.someotherwebsite/somefile.php will both be counted as /somefile.php so you need to use the Advanced Code Generator to prepend urls of each website (except the main website) with a unique name.
Counting Page Parameters
By default TraceWatch Web Stats does not count a certain page with different parameters as different pages, in other words:
/product?pid=1
/product?pid=2
both will be counted as /product
You can override this by setting global variable $GLOBALS['adl_count_params']=true; before the TraceWatch include statement on your pages. You can also use Advanced Code Generator to do this
By doing this if the page accept lots of different parameters you may be drastically increasing the size of paths, daily, monthly and dictionary data in database.
So do this only if different paremeters refer to totally different pages and you really need to have separate stats for those pages.
Counting non-PHP Pages
To count a non-PHP page you can use the Advanced Code Generator to get a Javascript code for your page.
The disadvantage is obvious, you will lose any information from visitors without a javascript enabled browser including almost all web robots and crawlers. You will not be able to track robots behavior on your website which is one of interesting parts of TraceWatch Web Stats. Change the file extension to .php instead of using JS code if possible.
Get Stats for a Remote Website
You can use both PHP and Javascript code to send visitors' information from a remote website to your local website. (local/remote is relative here, Remote is the website to be counted remotely, Local is the website with TraceWatch installation. This naming is reversed in Code Generator)
To get a remote JS or PHP code use the Advanced Code Generator.
Note that you can still ask the local website to write data to an alternative TWatch instance or prepend paths to get merged stats.
You don't need to have a full installation of TraceWatch on the remote website to use PHP code, just make a 'twatch_include' folder on the remote website and copy extlogger.php from your local twatch_include folder to that folder.
PHP code will work only if PHP on the remote website is not behind a firewall or something and allow_url_fopen is On in your PHP configuration,
if this code: fopen('http://somesite.com/somefile.php','r'); works on your server then you can use a remote PHP code.
JavaScript code will always work but has the disadvantages mentioned above.
If both websites are on the same server and the folder where TraceWatch is installed is locally accessible by the other website you don't need a remote code just use the Advanced Code Generator and change DOCUMENT_ROOT to access logger.php locally.
Install Multiple Instances of TraceWatch Web Stats
- Follow the basic installation instructions to install the default instance.
- Duplicate /twatch_include/userinfo.php.
- Rename the duplicate to userinfo_instanceID.php (replace instanceID with a unique name for this instance, you will use this ID to reffer to this instance).
- Open the new userinfo file in an editor and enter information for this instance. You only need to change $adl_pre which is prefix for tables to something other than 'twatch' but you can also change any other information.
- With your browser go to http://yourdomain/twatch/install.php
- Select the uniqueID you just choosed from the dropdown list, enter your username and password and click login.
- Continue the way you installed the default instance.
Installing TraceWatch Web Stats on IIS Servers
There is only one thing you should consider when installing TraceWatch Web Stats on an IIS server and that is if PHP is not installed as ISAPI module on the IIS server $HTTP_SERVER_VARS['DOCUMENT_ROOT'] may not be available, in such case TraceWatch will fall into trouble.
To solve this problem use the Advanced Code Generator and change DOCUMENT_ROOT to PATH_TRANSLATED, if this doesn't work either, enter the path manually.
Installing TraceWatch Web Stats in a folder other than root
The process is the same as installing TraceWatch in the root except that instead of using the default code on your pages you should use the Advanced Code Generator and specify where you have installed TraceWatch Web Stats.
Getting stats for different folders as different websites
Install a secondary instance, then use the Advanced Code Generator to get code with your new instance ID and use this code on the pages you want to count as different website.
