Microsoft KB Archive/825497

= How to create a custom hit counter that cannot be seen on your Web page in SharePoint Designer 2007 and in FrontPage 2003 =

Article ID: 825497

Article Last Modified on 6/1/2007

-

APPLIES TO


 * Microsoft Office SharePoint Designer 2007
 * Microsoft Office FrontPage 2003

-





For a Microsoft FrontPage 2002 version of this article, see 229900.





INTRODUCTION
This article describes how to use Microsoft Office SharePoint Designer 2007 and Microsoft Office FrontPage 2003 to create a custom hit counter that cannot be seen on your Web page. This article also describes how to obtain the hit counter information from your Web page.



How to insert a hit counter that cannot be seen on your Web page
To insert a hit counter, use one of the following methods.

Format the hit counter as hidden
To format the hit counter as hidden, follow these steps:
 * 1) Open the Web page in Design view. On the Insert menu, click Web Component.
 * 2) Under Component type, click Hit Counter.
 * 3) Under Choose a counter style, click a style from the list, and then click Finish.
 * 4) In the Hit Counter Properties box, do one or both of the following:
 * 5) * If you want to reset the hit counter, click to select the Reset the counter to check box, and then type a value to which to reset the hit counter.
 * 6) * If you want the hit counter to display a fixed number of digits, click to select the Fixed number of digits check box, and then type a value to which to limit the hit counter.
 * 7) Click the hit counter on your page to select it, and then click Font on the Format menu.
 * 8) Under Effects, click to select the Hidden check box, and then click OK.

Create a custom image that cannot be seen on your Web page
To create a custom image that cannot be seen on your Web page, follow these steps:
 * 1) Open the Web page in Design view. Use an image editing program to create the image that you want to use for the hit counter.

The image can be a transparent image, an image that has the same color as the background of the page, or an image that has a width of 1 pixel and a height of 1 pixel.

For more information about how to create a custom image, see the &quot;References&quot; section.
 * 1) Save the image in the Images folder of your Web site.
 * 2) On the Insert menu, click Web Component.
 * 3) Click Hit Counter. Under Choose a counter style, click a style in the list, and then click Finish.
 * 4) Click Custom Picture in the Hit Counter Properties dialog box.
 * 5) Type images/ in the window.

Note In this text,  is a placeholder for the file name of the image that you created in step 1.
 * 1) Click OK, and then save the page.

SharePoint Designer 2007
To retrieve hit counter information from the Web, follow these steps:
 * 1) In SharePoint Designer 2007, open your Web.
 * 2) On the Site menu, click Site Settings.
 * 3) On the Advanced tab, click to select the Show hidden files and folders check box.
 * 4) Click Apply, and then click Yes to update the Web.
 * 5) In Folders list task pane, click the _private folder.
 * 6) Right-click  .cnt.

Note In this file name,  is a placeholder for the name of the page in which you inserted the hit counter.

Point to Open With, and then click Choose Program.
 * 1) In the Open With box, click Notepad, and then make sure that the following check boxes are cleared:
 * 2) * Associate files of this type with the selected program
 * 3) * Set as default
 * 4) Click OK.

Your hit counter statistics are displayed in Notepad.

FrontPage 2003
To retrieve hit counter information from the Web, follow these steps:
 * 1) In FrontPage, open your Web.
 * 2) On the Tools menu, click Site Settings.
 * 3) On the Advanced tab, click to select the Show hidden files and folders check box.
 * 4) Click Apply, and then click Yes to update the Web.
 * 5) In Folders view, double-click to open the _private folder.
 * 6) Right-click  .cnt.

Note in this text,  is a placeholder for the name of the page in which you inserted the hit counter. Point to Open With, and then click Choose Program.
 * 1) In the Open With box, click Notepad, and then make sure that the following check boxes are cleared:
 * 2) * Associate files of this type with the selected program
 * 3) * Set as default
 * 4) Click OK.

Your hit counter statistics are displayed in Notepad.