The Roman Catholic Diocese of Saint Cloud
    home       parishes       schools       email

Diocesan Server Help

Page Design: Counters

triangle bullet Server Help
triangle bullet Hosting Services
triangle bullet Restrictions
triangle bullet Email Users
triangle bullet Web Page Design
    triangle bullet Standards
    triangle bullet index.html
    triangle bullet Email Links
    triangle bullet Email Forms
    triangle bullet Forms
    triangle bullet SSI's
    triangle bullet Include SSI
    triangle bullet Counters
    triangle bullet Calendars
    triangle bullet SiteSearch
    triangle bullet Podcasting
triangle bullet Web Site Admin
    triangle bullet favicon.ico
    triangle bullet robots.txt
    triangle bullet Error Pages
    triangle bullet Setting Counters
    triangle bullet Redirects
    triangle bullet Realms
    triangle bullet WebDAV
    triangle bullet Logs

You can insert a text hit counter in your web page that will visually display the number of times the web page has been accessed (since you inserted the counter).

The first requirement is that you change the 'extension' (the last part of your file's name). Since these counters are based on SSI technology, the filename should end with .shtml.

Next, you need to place special code within your web page's HTML source code. When someone visits your web site, this special code will be replaced with a number. The code below demonstrates the syntax for inserting a counter, replacing pager_identifier with something unique that identifies your web page.

<!--#counter var="page_identifier"-->

Here is an example of the code that you could place in your web page:

<!--#counter var="StCloudDiocese.org/server/count"-->

The above code will look like this when the public views your web page:

2637

The code can be placed virtually anywhere withing your web page. In this example, the code is placed in the middle of a sentence.

Did you know that people (and search engines) have accessed this page <!--#counter var="StCloudDiocese.org/server/count"--> times so that they could learn how to create counters?

The above example would look like this to the general public. Notice how it seemlessly fits into the sentence.

Did you know that people (and search engines) have accessed this page 2635 times so that they could learn how to create counters?

You may have noticed that the counter code looks a lot like the HTML code for a comment. In fact, this is HTML comment code, with additional code inside that triggers the diocesan server to replace it with a counter.

Now that you know what the code looks like, you can insert it into the HTML source code of your web page. Please remember though, that you need to include a unique page_identifier in the counter code. In the example on this page, I replaced page_identifier with StCloudDiocese.org/server/count. You can use whatever page identifier you would like, but it is recommended to use something specific to your web page (such as an abbreviated URL). The page identifier should be 31 characters or less.