How to create a page and to add the hit counter
To create a page and to add a hit counter to the page, follow these steps:
- On a Web server that is running Microsoft Internet Information Services (IIS) or Microsoft FrontPage Server Extensions 2002, start SharePoint Designer 2007 or FrontPage 2003, and then open a Web page.
- Start a new page. To do this in SharePoint Designer 2007, click the New Document button on the toolbar.
To do this in FrontPage 2003, click the New Page button on the toolbar. - In Page view at the bottom of the document window, click Design.
- Put the insertion point where you want to create the hit counter.
- On the Insert menu, click Web Component.
- Under Component type, click Hit Counter.
- Under Choose a counter style, double-click a hit counter style, and then click Finish.
- To set the counter to a specific number, click to select the Reset counter to check box, and then type the number.
- To display a fixed number of digits in the hit counter, click to select the Fixed number of digits check box, and then type the number.
For example, to display the hit counter as "00#" instead of as a single or double digit, click to select the Fixed number of digits check box, and then type 3.
- Click OK.
Note To add a hit counter to your Web site, your site must be located on a IIS server that is running Microsoft FrontPage 2002 Server Extensions, Microsoft SharePoint Team Services version 1.0, or Microsoft Windows SharePoint Services. Ask your Web server administrator or Internet service provider (ISP) whether your server is running these technologies.
How to use the hit counter on the page
To use the hit counter on the page, follow these steps:
- Put the insertion point before the hit counter object on the page.
- Type You are visitor
followed by a space.
How to save and to preview the page
To save and to preview the page, follow these steps:
- On the File
menu, click Save.
- Name the file CounterText.asp,
and then click Save.
- On the File
menu, point to Preview in Browser, and then specify the option that you want.
- Click Preview.
If you refresh the page in your browser, you will see the hit count value increment.
Note
Because the output from the hit counter object is text, the hit counter changes when you change the fonts and colors for the page.
How to reset the hit counter
To reset the value of the hit counter, follow these steps:
- In Page view, at the bottom of the document window, click Design.
- Double-click the hit counter.
- Click to select the Reset counter to check box, and then type a number in the box.
- Click OK.