![]() |
![]() |
|
|
|
|
|
Help Desk > Tutorials > Personal and Group Web Sites |
Printable Version
|
A script, Texcounter, from Matt's Script Archive has been placed on webpub for you to use if you would like to count hits, or visits, to your webpub website. This counter gives a text display of the number of times your page is loaded.
Note: These instructions will only work for pages on webpub.
To insert a counter into your page, you just need to put the following code at the location where you would like the count to appear:
<!--#exec cgi="/cgi-bin/counter.pl"-->
and then save your page with the extension .shtml (e.g., index.shtml). If you do not use the .shtml extension, the counter will not work!
This will simply display a number, which will increment each time your page is loaded. If you want to include some added text (e.g., "You are visitor number..." or "...hits since 1/1/2000!") simply add the desired text before or after the code above, whichever is appropriate.
If you would like to hide your count, so that it doesn't display on the web page, use a font color to match the background color of your page. For instance, if your background color is white, use the code
<font color="#FFFFFF"><!--#exec cgi="/cgi-bin/counter.pl"--></font>
To see your count, then, you will have to load the page and view the source code. Of course, anyone else can see your count that way, too, but only you will know to look for it!
A sample of the counter in action is here.