Free Tracker Code

Step 1 - Compatibility Check

This counter will run on your website and uses a feature called PHP.

Please copy the code below to a file on your website called "test.php" and open the file at your site in your web browser.

Then you will see a message telling you whether or not PHP is enabled on your website.

If your site is not PHP compatible you might want to set up another hosting account where you can run your tracker and link it to your other web sites.

Step 2 - The Tracker Code

Copy this code to a directory on your website called "log". Name the file "tracker.php"

Next, you need to set the permissions of the log directory to 755 (or try 766 or 777) (you may need to experiment with permissions to see what works). This allows the tracker to write the log file to your web space.

For help on permissions try: FAQ

You will need an FTP (file transfer) program that lets you use the CHMOD command such as AceFTP or SmartFTP

You can change some of the settings such as the password, maximum number of lines to store in the log and the name of the log file. Normally, you would only change the password.

Scroll down the code to find
"// CUSTOMIZATION" after the intial comments. Then change "mypass" to "yourpass".

Step 3 - Linking Pages to Tracker

Insert the following code in the body of your web pages:

Change the "pics" value to something that relates to your particular page that you are tracking.

Also make sure trackerPath value points to the location of your tracker code e.g. "log/tracker.php".

Step 4 - Check Stats

To view the stats, point your browser at your tracker.php file and it will open a web page prompting you to enter your password. Enter this and your web stats are displayed.

Good luck - Andy!

logo
Webmaster Tools & Resources