Table of Contents

Simple Text Counters

Simple text counters generate unique counter for each web page they are placed on. They are fast and efficient, and the same line of code works on any page on which you care to insert a counter.

Visually, simple text counters use the format of the page element they are found in, e.g. a simple text counter in a header element will appear in the header style. CSS is fully supported, and you can create pseudo-graphic counters by wrapping the comment in a <span class="counterclass"></span>.

Adding Simple Text Counters

Adding a text counter to your pages is fairly simple. If you edit your pages with a text editor (or your page design program allows you to directly edit the source code) all you do is insert this specially constructed comment into the HTML code that defines your web page:

<!--#exec cgi="/cgi-bin/AS/counter.pl"-->

Spacing is critical! Make sure you do not add spaces to the string, particularly between the -- and the #.

The text counter display: [an error occurred while processing this directive]

If your page design program does not allow you to directly edit the page source code, you will need to figure out how it allows you to add hidden comments to a page, then add this comment where you want the counter to appear:<--#exec cgi="/cgi-bin/AS/counter.pl"-->
If the counter does not appear, your program may be adding extra spaces to the text. (Contact us if you are experiencing difficulties.)

Counter Reports

At this time, you can not generate a unified report of simple text counters as you can the BIAP (graphic) counters, below.

Graphic (BIAP) Counters

BIAP Counter is a plug-in for Macintosh based web servers that maintains and displays Web page counters via GIF images. All graphic images are cached, providing both rapid access and reliability. Features of BIAP Counter include:

Using BIAP Counters

Using BIAP Counter is very straightforward. To add a counter to one of your HTML pages, all you have to do is insert an image tag into your page that looks something like this:

<img src="http://www.sherwoodstore.com/myID.mypage.count">

When constructing a counter, follow this syntax:

If your counter URL is constructed correctly, every time a page it is on is accessed BIAP Counter will increment the counter for "mypage" by one, and display the counter value using the default digit set (as shown below).

While that's sufficient to get started putting simple graphical counters in your pages, BIAP Counter allows you to do much more.

Note: Counters can be set to any value desired at any time. Contact Autograph Systems, if you need a counter adjusted.

Counter Names and Groups

Often, a single web site may want to have multiple pages each with its own unique counter. Or you may want to have multiple pages that all add up in a single counter. Since each variation of the keyword ("mypage" in the example above) is a unique counter, you can create multiple counters by using unique words for each page, and you can create a single counter that counts multiple pages by using the same keyword on multiple pages.

For example, a site that has a counter on its home page and a different counter on its search page could put the counter

<img src="http://www.sherwoodstore.com/myID.homepage.count">

on its home page and

<img src="http://www.sherwoodstore.com/myID.searches.count">

on its search page. Each of these counters will be tracked separately.

Conversely, a site that has three "what's new" pages and wants them all to share a single counter would put

<img src="http://www.sherwoodstore.com/myID.whatsnew.count">

on all three pages. Each visit to any one of the pages would increment the counter.

Using Digit Graphic Sets

Samples and Examples

In the simple example above, BIAP Counter was only provided with the name of the counter (e.g.: "myID.mypage"). No other options were specified. Thus, the resulting graphical counter was displayed using the default digit format. BIAP Counter is also able to generate graphical counter images using any number of other digit formats. BIAP Counter comes with 10 different sets of digit graphics. The basic set includes:

The default set is the "metersmall" set.

Any graphical counter can be displayed using any of the digit graphic sets. All you have to do is append a dollar sign ($) and the name of the digit graphic set to the counter name string. For example:

<IMG SRC="http://www.sherwoodstore.com/myID.mypage.count$brass">

displays the "mypage" counter using the "brass" digit format. Remember that the ".count" suffix is appended to all counter names to tell your Web server that BIAP Counter is supposed to handle this image request. The dollar sign and digit graphic set name are always appended to that ".count" suffix. Another example:

<IMG SRC="http://www.sherwoodstore.com/store.page1.count$lasersmall">

displays the counter named "store.page1" (which belongs to the "store" group) using the "lasersmall" digit graphics set.

Counter Options

By default, BIAP Counter increments and displays a counter padded with zeros so that the counter is always at least seven digits long. However, can specify several options that control the incrementing and display of counters. These options are specified by appending them to the counter name string after a question mark (?). For example:

<IMG SRC="mypage.count?noinc+3">

BIAP Counter supports the following options:

In the example above, the "mypage" counter to be displayed, without incrementing it, using a minimum of three digits (and the default digit graphic set). If the counter value was under 100 (i.e., less than 3 digits), then the counter would be padded on the left with zeros. If the counter value was greater than 999 (i.e., more than 3 digits), then all digits of the counter would be displayed with no leading zeros. Legal length values range between 3 and 10. Any length values outside of this range are ignored.

Another example:

<IMG SRC="http://www.sherwoodstore.com/mypage.count$brass?noshow">

displays increment the "mypage" counter without incrementing it. The "brass" digit set specification would be ignored.

Viewing Counter Groups

All counters belonging to a user can be viewed via a dynamically generated web page. Just access a URL of the form:

http://www.sherwoodstore.com/viewcounters.count?myID

(replace "myID" with your user name). This will access the counter group display page.


Adpated from the original documentation written by Louis Slothouber (07/30/98) by Matthew Strange (10/01/2003
Copyright 1998, BIAP Systems, Inc., All Rights Reserved.