Counters

For website traffic tracking and information we recommend
using the free Google Analytics Tool.

If all you want is a counter cgi tool, then you can use the option below.
But there is no support for the method below.


Counter Tool

 

What is a counter?

A counter is an image that is frequently displayed on web pages to help the owner monitor the use of the page. The image is attached to a piece of CGI script which increments the counter each time the web page is accessed.

Where can I get a counter?

CCIT has provided a counter for your use. You do not need to write a CGI script yourself because you are using a link that will attach your image to our script. Therefore, it is very simple for you to add a very nice counter to your page. The various counters are described below.

The simple counter:

This counter should fit the style of most pages. All you need to do is highlight the text below, copy it exactly as it appears and paste it into your web page. Make sure there are no spaces in the text that appears between the parentheses. Do not put any new line elements in this text. Replace "count1.dat" with your username, for example: "fred1.dat". Every counter you use should have a different data file name, which can be done by numbering the files (fred1.dat, fred2.dat, etc.).

<img src="http://www.clemson.edu/cgi-bin/Count.cgi?ft=9|frgb=69;139;50|tr=0|trgb=0;0;0|wxh=15;20|md=8|dd=A|st=5|sh=1|df=count1.dat" align=absmiddle>

counter example

 


 

How can I customize my counter?

Adjusting Border Width

To adjust the width of the border around your counter, change the "ft=" number. If you do not want a border on your counter, you would set "ft=0". If you want a larger dimensional border, you would set "ft=9." In our simple counter, we have set "ft=6" for a simple border. Examples of these changes are shown below.

counter exampleft=0

counter exampleft=9

 


 

Adjusting Border Color

To adjust the color of the border around your counter, change the "frgb=" numbers. The first number represents the red component, the second the green component, and the third the blue component which makes up the color. You can try out different number combinations until you reach the desired color. The color range for each component is between 0 and 250.

counter red borderfrgb=140;10;20 (red)

counter purple borderfrgb=50;10;140 (purple)

counter blue borderfrgb=10;20;150 (blue)

 


 

Transparency

If you do not want your image to be transparent, set "tr=0". If you would like to have a transparent image, set "tr=1" and specify the color which will be transparent. If you would like the black background to be transparent, then set "trgb=0;0;0". The black portions of the image will now take the background that you have defined for your web page. In our example, the black portions become the white background of our page. Note: with version 2.5 of count.cgi, if you specify trgb= then the value of tr= WILL be 1 no matter what you specify in your html code. So, if you do not want the counter to be transparent DO NOT specify trgb=.

counter with transparencytr=1|trgb=0;0;0

 


 

Adjusting Digit Size

If you would like to adjust the size of the digits in your counter, change the "wxh=" numbers. The first number represents the width and the second number represents the height. In our simple counter, we have set "wxh=15;20". Here are some other popular sizes:

counter with small textwxh=6;8 (small)

counter with large textwxh=21;28 (large)

 


 

Adjusting Number of Digits Displayed

You have two options for adjusting the number of digits displayed. In our simple counter, we choose to set "md=8" which mean that maximum number of digits displayed will be 8. If the number in the counter is not eight digits long, then it will pad the number with zeros. If you do not want the number to be padded at all, replace the "md=8" with "pad=0". You must choose one option or the other.

counter with small numbersmd=9

counter with large numberspad=0

 


 

Changing the Digit Style

You have the ability to choose between 4 different digit styles. On the simple counter, we have chosen "dd=A". Other options are B, C, and D. Examples are shown below.

counter white numbers and black backgrounddd=B

counter black numbers and white backgrounddd=C

counter green numbers and white backgrounddd=D


Choosing a Starting Value

To start the counter at a particular value, just set "st=" to the starting value. We chose to start our counter at 5, but if you are currently using another counter, you may want to start your new counter at the last value on the old counter. For example, if your old counter is at 1342 then you would set this counter at "st=1342".


Making an Invisible Counter

If you like the idea of a counter, but you do not want everyone to see that image on your page, then you want to make your counter invisible. Just set "sh=0" and the digit image will not be displayed and will be replaced by a transparent 1x1 image. This will give the illusions of nothing being displayed. The counter will still be incremented and you will be able to obtain the data from your "username1.dat" file. This option is a new feature in this release.

help button

Contact CCIT
Service Desk:

Support Hours
(864) 656-3494
ITHELP@clemson.edu

Live Chat

Help & Support Form
Use this form to report a problem, ask for help or leave a comment.