Hosted websites will become read-only beginning in early 2024. At that time, all logins will be disabled, but hosted sites will remain on RootsWeb as static content. Website owners wishing to maintain their sites must migrate to a different hosting provider before 2024 (More info)
Basics of RootsWeb Counters - Cliff Lamere











Cliff Lamere    Oct 2000




RootsWeb has a page on which a great amount of information is available about counters.  The URL is:

The page will allow you to create a counter, change the counter's number, or query it for information.  A query does not increment (increase) the counter's number. 


When you create a counter, you must use a password for that counter, but it doesn't have to be the same one that RootsWeb assigned you (which, for security reasons, is so difficult to remember).  Make up an easier password, and then use it for all counters that you create.


For your counter name, I recommend that you use the same name as your file name (it is easier to remember the counter name that way), with one exception.  My file names use hyphens in them, but they are not allowed in the counter name.  But, they do allow underscores, so here is what I do.  If a file is named CH-Ref.htm (which means it is in the Church section and is about Reformed Churches), then the counter name I choose is CH_Ref  .  You cannot use a period (dot), so the htm part cannot be included.



When you create a counter, you get a code to place into your document (which must be placed there while you are in html view).  EVERY counter code is identical except for the name that you assign to the counter, which will appear at the end of the counter code.  Here is what a code looks like (notice the file name at the end).


<img src="">


Before the last quotation mark, you can add options which are shown on the RootsWeb page above.  These will make your counter more pleasing in appearance.  For example, I like the border of the counter to be a darker shade of the color that makes up the background or border that I use in a web page.  I don't like all of the leading zeros to show in the counter, so I get rid of them.  I don't like the green numbers or the large size of the counter.  I change these.  Unfortunately, the instructions for making these changes are sometimes lacking, confusing, or wrong.

I break each code into two lines to make things easier for me.  The first line is the code sent from RootsWeb; the second is what I add.  Before adding anything, I must remove the   ">   at the end of the RootsWeb code so that my "improvements" will have an affect.  There should be no space after the first line of code (you may not notice it there) or anyplace else in the counter code.  After adding the improvement codes, at the end of the line, I must finish with the   ">   that I removed from the first line.  It tells the computer software where the Counter's code ends.   Here is what I mean.


<img src="


|md=7|pad=N|dd=B|ft=6|frgb=00;51;204">          (blank line between the two parts is only so you can 

                                                                              see the parts better)


md   = maximum number of digits to be shown.

pad  = whether or not you want a string of zeros to appear before the count (N = No)

dd    = digit style (chosen from those shown on RootsWeb site)

ft     = frame thickness

frgb = frame color (red, green, blue)

|       = vertical line on the keyboard that looks like a broken vertical line (used to separate counter options).




A code that you add must be separated from the previous code.  The simplest separator to use is  a "pipe", which is the vertical line which is broken in the middle on your keyboard.  In a document the pipe is not broken, as you can see here (  |  ).  The following is an example of a complete code that you might add:




Caution:  When I insert a counter code into a file before the counter has been created on the RootsWeb counter page, my software rebels.  Creating the counter later does not usually correct the problem for me.  It could save you a lot of time if you do things in the proper order.




Here are some working counters which will tell you about how many times this site has been visited (complete accuracy is not possible for several reasons).  My options are shown in the code that would normally be seen only in HTML view.  Feel free to copy anything you like and use it.


      Visitors to this site since 2 Oct 2000              |md=7|pad=N|dd=B|ft=6|frgb=00;51;204">


If you use a counter, you must leave room for it to expand.  It will add digits as it increases from 9 to 10, or 99 to 100, or 999 to 1000.  If your counter is on a normal line of text, it will expand to the right.  If you fail to leave room, as it grows in length it may eventually appear unexpectedly at the beginning of the following line.  If your counter is right aligned, it will expand to the left.





               |md=7|pad=N|dd=B|ft=6|frgb=255;0;102">    (frame thickness is 6)

               |md=7|pad=N|dd=B|ft=7|frgb=120;51;0">      (frame thickness is 7)

              |md=7|pad=N|dd=B|ft=8|frgb=67;192;130">  (frame thickness is 8)

              |md=7|pad=N|dd=B|ft=9|frgb=150;15;150">  (frame thickness is 9)




To change the color of the frame around a counter, you must first determine the three numbers (red, green, and blue = rgb) that represent the color that you want.  I use FrontPage as my html editor, so I find the number as follows.  I right click on the background of the page, go to Page Properties, choose the Background tab, then choose More Colors.  I click on a color that is close to what I want, then I choose Custom.  I slide the black arrow head up (larger numbers means lighter) and down (darker).  The Red, Green and Blue values (as seen in the lower right) will change as I do this.  I can also click anywhere in the section of colored stripes.  That will allow me to change the color in other ways.  When I am satisfied, I record the RGB value and insert it into my counter in place of the numbers already there.




There are five styles.  Each has a different look.  Not all have the same size.  Two of the styles have green numbers, two have white numbers, and one has black.  You cannot control the color of the number or the background color.  The styles are controlled by the     dd=    part of the counter code.  The dd options are A, B, C, D, or E.  The following examples all have a frame thickness of 6.


               |md=7|pad=N|dd=A|ft=6|frgb=255;0;102">    (dd=A)


               |md=7|pad=N|dd=B|ft=6|frgb=255;0;102">    (dd=B)


               |md=7|pad=N|dd=C|ft=6|frgb=255;0;102">    (dd=C)


                  |md=7|pad=N|dd=D|ft=6|frgb=255;0;102">    (dd=D)


                    |md=7|pad=N|dd=E|ft=6|frgb=255;0;102">    (dd=E)




Since the counter is a graphic, you can click on it and eight dots will appear around its edge.  If you put the mouse cursor on the upper right dot, it will turn into a double-headed arrow.  Hold down on the left mouse button as you drag the cursor in a direction that is upward and to the right.  This will increase the size of the counter (or any graphic for that matter) while keeping the proportions of the counter about the same as they were originally.  Below this paragraph is the tiny counter that exists just before this paragraph.  The size is much different because I followed the instructions in this paragraph on how to change its size.  You can see that all of its codes are the same, although in HTML view you would notice that some dimensions had been added at the end of the code (width="79" height="69").


               |md=7|pad=N|dd=E|ft=6|frgb=255;0;102">  (frame thickness code is still 6)



Transparent Background or Numbers Inside a Counter 

Only black and white are used as backgrounds behind the counter numbers.  If you make them transparent, then the background color of the webpage will show through.  They can be made transparent by adding

        |trgb=0;0;0                    (to make black transparent), or

        |trbg=255;255;255     (to make white transparent)


To make the numbers transparent, you would use exactly the same codes, depending on the color of the numbers.  If the numbers are green, add this code         |trgb=0;255;0 


Using my software, I cannot get this feature to work for me.  Only about the bottom third of the background becomes transparent.  Other people have no trouble with it.  Try it and see.


               |md=7|pad=N|dd=B|ft=6|frgb=255;0;102|trgb=0;0;0">    (dd=B)




It is possible that you would like to count the hits on a webpage, but you may not want others to see the counter.  For you to see it, you can either query the counter at the RootsWeb Counter page, or you can set up a separate counter page on your own website.


Add this code to make a counter invisible:            |sh=N 




If you insert a counter by the same name onto more than one webpage, every counter by that name will be increased when a new visitor goes to any one of the sites containing the counters.  Counters only count "new" visitors.  A counter will not increase if the same person makes repeated visits, unless another person has visited the page in the meantime.  Therefore, if a person visits four webpages all of which contain copies of the same counter, the counters will not be increased after the first visit as long as none of the pages that have the counters is visited by another person in between.




You wouldn't want to increment a counter every time you look to see how many hits a webpage has received.  To avoid this, you can set up a special counter page.  It can have any name (I use Counters.htm), and it will work from anywhere on your RootsWeb site, including in a subdirectory called Counters.  Put a copy of each counter's complete code into a file which you then place on your website.  However, if you use an invisible counter on your regular pages, you must remove that code in order to see the counter on this page.  


To prevent the counter from increasing when you visit the counter page, something must be added to each counter's code.  It is   incr=F     which means       Increment = False. 


This is especially important if several people have access to your counter page.  Without the incr=F code, each visit could increase the value of every counter on the page.  


Note:  Even without this code, the counter will not increment if the same person makes several visits in a row, without any other person making a visit in between.  The counter only increments if the visitor is different from the last one who came to the webpage that the counter is on.


If you would like to see my Counter page, click on this link.




If you have questions about the counters above, or if the directions seem unclear, don't hesitate to write.