Version 20
 

Stap 4 - Javascript


To assure the correct working of the stat, you got to include a line of JavaScript in each site you want to track. Place the following code between the open and closing body brackets of your html files:

<script src="http://www.example.com/stat/pws.php?mode=js"></script>

If you use XHTML code in your site, use the following template:

<script type="text/javascript" src="http://www.example.com/stat/pws.php?mode=js"></script>

Please be aware that you change the domain path to your own server. You got to put the full external path to your PWS.PHP in that.
The fact that the path to your tracking scripts is an external one, gives you the possibility to log all sites that are placed in other subfolders on your server.

Including into pure PHP Sites

We deliver the stat with the following php file "config/tracking_code.php". This file you can use as a smart template for including the tracking code into your site.

<?php include ( 'stat/config/tracking_code.php' ) ?>


If your site is by XHTML, use:

<?php include ( 'stat/config/tracking_code_xhtml.php' ) ?>

Now you are finished with the installation and you can check if everything is working correct. Open a browser and call the index.php.