Home > AXS Visitor Tracking > Help > 1505

Definition of "relevant hits", "total hits" and "corrupt data points"

The "total hits" value is the smaller of either:

  1. the total number of valid records stored in the log.txt file, or

  2. the total number of valid records remaining after the "Graphing Filters" have been applied, such as the checkbox "Graph only hits from yesterday and today"

When AXS initialized, it reads in all of the lines in log.txt. If any given line does not match a specific pattern, it is counted as a "corrupt data point". This should never happen but it sometimes does (see below). The corrupt data points variable stores the total number of these lines. Then, each line that does match the pattern is converted into an AXS visit record. If there are any Graphing Filters defined, then the record will be compared against those filters and if it doesn't match then it'll be discarded. All remaining records are saved in memory, and the total_hits variable stores the number of such records.

Whenever a graph view or database view is created, the relevant hits count is initialized. Each record used to create that graph or database view is counted among the "relevant hits". For example, when graphing "Hits from Other Sites", only traffic coming from a separate site (like a search engine) is counted as relevant. Visits in which the visitor is traveling from page to page on your own site, or in which he followed a bookmark or directly typed in your URL, are not counted as relevant to the "Hits from Other Sites" graph.

For some views -- like the "Sort All By Time" Database Listing -- the "relevant hits" should always equal "total hits".

Here is a review of the various views and reasons for a difference between "relevant hits" and "total hits":

Graph Types: relevant hits vs total hits
Graph Type Reason
Web Browser (Netscape 3.01 Gold)
Abbreviated Browser (Netscape 3.X)
Browser Wars (Netscape)
Operating System (Windows 98)

In most cases they will be equal.

If you view "Browser Wars" and then drill down on "Netscape", then the "relevant hits" will only include Netscape-type browsers, while "total hits" will continue to include all browsers. Similar offset will occur when drilling down on specific browser versions or Operating Systems.

The drill-down option is only available in AXS 0024 and newer.

Visitors Top Level Domains (.com)
First Level Domains (xav.com)
Full Server Address (noc.xav.com)
Visitor IP Address (206.134.243.3)

Values will be equal.

Hits from Other Sites (Full URL)
Hits from Other Sites (Domain Only)

Only relevant records are those where 1) a visitor travels from a remote site to your local site and 2) that remote site is visible in the HTTP_REFERER variable. Almost always "relevant hits" will be much lower than "total hits".

Note that AXS uses the My_Web_Address variable to decide what is a remote site and what is your local site; you may need to tune that variable (see below).

Hyperlinks Followed From This Site

Only relevant records are those where a visitor travels from your local site to a remote site while following an ax.pl redirect (i.e. a href=ax.pl?http://www.xav.com/). Almost always "relevant hits" will be much lower than "total hits".

Note that AXS uses the My_Web_Address variable to decide what is a remote site and what is your local site; you may need to tune that variable (see below).

Hits to Local Documents
Average Number of Hits Per Visitor

Should be almost equal to "total hits". All records will be considered hits to your local documents except those that involve visitors leaving the site to visit a remote site via an ax.pl redirect.

Note that AXS uses the My_Web_Address variable to decide what is a remote site and what is your local site; you may need to tune that variable (see below).

Hits By Day of Year
Hits By Day of the Week
Hits By Hour of the Day

Values will be equal.

Database Views: relevant hits vs total hits
Sort all by time

Values will be equal.

If you enter an integer or the letter "L" into the textbox right before the database listing type, then the listings will be restricted to that integer number of records, or the records since your last visit. In either of these cases, the "relevant hits" value may be lower due to these restrictions.

Sort all by visitor

Values will be equal.

Note that the "graph summary" at the bottom doesn't mention "relevant hits" at all. I plan to change that.

If you enter an integer or the letter "L" into the textbox right before the database listing type, then the listings will be restricted to that integer number of records, or the records since your last visit. In either of these cases, the "relevant hits" value may be lower due to these restrictions.

Visitor flow only

"Relevant hits" will generally be lower. Only lists sets of records where the visitor IP address has made at least two visits.

Note that the "graph summary" at the bottom doesn't mention "relevant hits" at all. I plan to change that.

If you enter an integer or the letter "L" into the textbox right before the database listing type, then the listings will be restricted to that integer number of records, or the records since your last visit. In either of these cases, the "relevant hits" value may be lower due to these restrictions.


Tuning the "My Web Address" Variable

In AXS verson 2.3.0023 and earlier, this was defined in the source code as $My_Web_Address. It is now a setting that can be updated from the web on the "ax-admin" page under "Customize" and then "Local web pages will be any web pages which contain this substring in their URL: []". In all cases this value defaults to HTTP_HOST.

How can this be a problem? If your variable is set to "www.xav.com" then any URL must contain that substring to be considered a "local hit". But if many of your visitors type in "http://xav.com/" then there won't be a substring match, and that visit won't be considered local. Also, if your ax-admin script is running on a server different than the one being logged, then the HTTP_HOST default value won't be an appropriate value, and you'll want to change it. Basically using the shortest unique substring will be the way to go, like "xav.com" instead of "www.xav.com".


Corrupt Data Points?

As AXS has evolved, the "ax.pl" or "ax.cgi" program has been improved to prevent invalid data from ever entering the "log.txt" file. It is still possible that corrupt data can get in though. If you experience corrupt data points, you may want to send Fluid Dynamics your "log.txt" file or the corrupt portion of it, along with a cut-n-paste of the corrupt data points message. I will try to investigate what went wrong.

If you have a "log.txt" file that includes records created long ago, with older versions of "ax.pl" or "ax.cgi", and you then upgrade to a newer version of AXS, then you might get this error because we're now more strict about what kind of records are allowed. In this case it is sometimes best to just delete the old data, or keep an older version of AXS around for analyzing it.


    "Definition of "relevant hits", "total hits" and "corrupt data points""
    http://www.xav.com/scripts/axs/help/1505.html