Tracking Your Pages
Stat Trax Online Documentation
Last Updated: 14 Jul 97


First, if you don't feel like reading all this technical information and you have a Java-enabled web browser, you can generate your page code automatically!

It's very simple to track pages on your site with Stat Trax. All you need to do to get started is put a single line of HTML on every page on your site that you wish to track. What does this line look like? Well, here's an example.

<IMG SRC="http://www.stattrax.com/cgi/stattrax.cgi?account=75&page=1">

That's it! The above statement would be for user 75 on his first page he set up. Do page numbers have to be in any order? Will my page be tracked if I skip numbers? Absolutely not! Many people using a grouping system to detemine which page numbers they use on their pages. For example, pages from 1000 to 1999 are for personal pages, 2000 to 2999 are for a business web site, etc. It's up to you! Just remember that you only want to use each page number once per account.

After you have set up your pages and accessed them at least once to initialize your new page accounts, jump back to the Stat Trax Administration Page. Your accounts will automatically be set up waiting for you when you arrive.

Right now you could substitute your account number for the 75 in the statement above and start placing this on your pages. Everything would work just fine! But there's much more that can be done with your "tracking statement". Let's break it down below.

<IMG SRC="http://www.stattrax.com/cgi/stattrax.cgi?account=A&page=B&graphic=C&offset=D&ref=E">

account=A (required)
"A" is your account number that was given to you when you signed up. You must keep this the same on every page that you track. This is the field that links all your pages into your single account record.

page=B (required)
"B" is the page number that YOU assign. This can be any number, as long as it is unique to the other pages you are tracking. This is also the last mandatory field that you must use to sucessfully track your pages.

graphic=C (optional)
"C" is a number that designates what you want shown on your page as a result of the tracking call. By default, a 49 byte 1x1 transparent pixel will be displayed on your page. Other options for this value can be found in the "graphics galleria".

offset=D (optional)
For those of you using graphical hit counters instead of the transparent tracking graphic, don't you wish there was a way to "inflate" the number shown to reflect hits received since your site went up instead of hits received since you started to use this service? Well, this is your way of doing that. Whatever number you replace "D" with, that will be added to your total Stat Trax hits before being displayed on your web page.

ref=E (optional)
This field will allow you to track page referers. What is a page referer? Well, if your site is listed on some search engines, this will allow you to see where the majority of people are coming FROM. Anyone that has a link to your site will show up in your reports (as long as people use that link). Obviously, you just can't type a value into this field and expect it to dynamically change when people come from different places. Since this is a complicated topic and these are supposed to be easy-to-follow instructions, the full information on how to get the referer field working will be found below.

An example:

Mr. Doe just signed up for Stat Trax and received account number 4523. He has 2 pages on his web site that he wants to track. For no particular reason, he will assign these page numbers of 10 and 20. On his first page, he wants the odometer-like counter to be displayed, and he wants the numbers started at 25,000. On his second page, he wants it to be 'invisible'.

<IMG SRC="http://www.stattrax.com/cgi/stattrax.cgi?account=4523&page=10&graphic=5&offset=25000">

<IMG SRC="http://www.stattrax.com/cgi/stattrax.cgi?account=4523&page=20">

A note for long-time customers:

You might be reading this page wondering, "My HTML code doesn't look anything like that! Are my pages still being tracked? Do I really need to change everything?".

Correct. Yes. Maybe. The old way of tracking ".../cgi/stattrax.cgi/acct:page:graphic:offset" still works just the same. You don't have to change a thing unless you want to take advantage of the referer tracking capabilities of the new system. If you do change, remember to substitute a question mark for the last slash, or else it won't work. When we were making our first changeovers, we made that mistake numerous times.

How to get the referer field working properly:

3 words: Server Side Includes, or SSI. I will only be able to explain how to accomplish this on an Apache web server. If you have any questions, first ask your Internet Service Provider, and then send us your questions.

Quick and easy way to get this done (leaving most of the tracking statement out of this for space concerns):

...?account=4523&page=10&ref=<!--#echo var="HTTP_REFERER"-->">

Now, come from another page onto the page you just put that on. View the source code. You should see something like "...&ref=http://www.something.com/file.html..." or "...&ref=(none)..". Both of these would signify that you have your SSI's working. If the field is blank, create a blank HTML file with only this line in it.

<HTML><BODY><!--#echo var="REMOTE_ADDR"--></BODY></HTML>

If the file comes up blank, then you may not have your SSI's configured correctly, or may be calling them incorrectly. If you received your IP address, then everything is set up fine. Re-check your tracking statement, or cut and paste it into an email and send it to us.

If you are having problems with this, Patti Wells of Mirror Images Web Design set us this excellent Referer HOW-TO on how to get this working.

If you want to read more on SSI's, we recommend reading Apache Week's Using Server Side Includes article.



Copyright © 1996-2001 Stat Trax. All Rights Reserved.
privacy statement
Sign up for your free trial account! View which graphic formats are available View your stats! Contact Information Online Documentation Stat Trax Home Page View Report Demos Pricing Information Frequently Asked Questions Newsletters