Vol. 1, No. 16
Counters, Guestbooks, and Stats
We've touched before on the uncontrollable urge of most site builders to
know exactly who's visiting their sites, when, and what they're doing there.
Forms have the
advantage of allowing you to collect detailed answers to the questions you
put before your site's visitors. Unfortunately, they only provide you with
information about those users who take the time to fill them out. Thus, when
you collate the results of your Web forms, you might understandably come to
the conclusion that everyone who visits your site is quite patient and enjoys
as a hobby the laborious filling out of forms.
Web-page counters, on the other hand, will tally every visitor, even those
impatient types who drop in, glance at your index page, and then dash
off for an urgent peek at the latest Pamela Anderson shrine. Counters are
extremely easy to implement, unlike such tedious techniques as forms and
cookies. You can track visits to particular pages, or to your entire site.
A simple counter can be implemented on a Tripod page with a single line of
code:
<IMG SRC="/bin/counter/mypage.html?FF0000">
The text that appears around this code is up to you. The digit that will
ultimately be displayed in the counter image reveals the number of hits
received since the counter's addition. Note that it only represents the
number of visits to the page that is specified after the word "counter" in
the code, not to your entire site. In the example above, it will display
the number of hits to mypage.html. With this coding, you can display stats
for a page on any other page, if you so desire. The number following the
question mark is optional, and represents the color of the counter. The
"FF0000" in the code calls for the counter numbers to appear in bright red.
(If you don't include the number, be sure to leave off the question mark as
well.)
Stats
A more detailed analysis of your traffic is also available through Nedstat. With this tool, visits are
automatically charted for you in a variety of ways. You can track how many
people visited each day, which days or hours saw the most and least hits,
where visitors came from, and how your visitors are distributed, in terms
of both physical geography and IP address. The Nedstat registration page will provide
you with the exact code you'll need to put on your page, but it more or less looks
like this:
<A HREF="http://nedstat.tripod.com/bin/viewstat?name=myname-1"><IMG
SRC="http://nedstat.tripod.com/bin/nedstat.gif?name=myname-1"
BORDER=0 ALT="Nedstat Counter" WIDTH=22 HEIGHT=22></A>
You adept code wranglers will no doubt recognize that this code produces
the following linked image on your page:

Any visitor who clicks on that Nedstat logo (including your fine self) is
taken to a stats page for your site. The block of code needs to appear on
every page for which you want to track statistics.
Guestbooks
Okay, now you've got a swell, accurate-to-a-T head count of your site's
visitors. But who knows what they think of your work? Perhaps that recent
rise in hits is due to a link from one of those "Worst-of-the-Web" sites!
One way to prevent that dark scenario is to provide your visitors with a
guestbook. This way, if they're shocked and/or appalled by what they see,
you'll be the first to know. Tripod members can receive free guestbook
services from htmlGEAR. Just register,
select a name and password, and answer a few questions about your site.
You'll receive a dozen or so lines of code to paste into your page's code.
Then upload, and you're ready to collect visitor comments!
The code will display two links on your page, as well as the htmlGEAR
logo. One of the links, "Sign My Guestbook," allows visitors to add their
own entries to your guestbook, including their name, location, and comments.
The other link, "View My Guestbook," allows them to read the gems that past
visitors have left. Customize the look and behavior of your guestbook by
barring select visitors, automatically e-mailing replies, editing the entries
people have posted, and viewing statistics about who has posted.
HINTS, POINTERS, and TIPS o' the TRADE
Perhaps you don't want your visitors to see just how many (or how pathetically
few, as the case may be) hits you've gotten. In that case, use a simple
counter, put the code on a page known only to you, and point it to the page(s)
you're interested in. This trick, alas, won't work with Nedstat, that paragon
of democracy.
If the new counter you've installed reveals the dreaded truth nobody's
visiting your site! check out our guide to Promoting Your Site.
Tripod is testing a feature that allows you to put your own CGI scripts on your
site, freeing you up to do whatever you want, including creating your own
guestbooks and page counters. Check it out!
Nail polish remover also removes scuffs from leather shoes. Lifts 'em right off
like magic!
RESOURCES:
Tripod Homepage-Building Help: Guestbook