Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

For a Microsoft FrontPage 2002 version of this article, see 229900 (http://support.microsoft.com/kb/229900/ ) .
For a Microsoft FrontPage 2002 version of this article, see 229900 (http://support.microsoft.com/kb/229900/ ) .

↑ Back to the top


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.

↑ Back to the top


More information

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:
    • 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.
    • 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.
  5. Click the hit counter on your page to select it, and then click Font on the Format menu.
  6. 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 "References" section.
  2. Save the image in the Images folder of your Web site.
  3. On the Insert menu, click Web Component.
  4. Click Hit Counter. Under Choose a counter style, click a style in the list, and then click Finish.
  5. Click Custom Picture in the Hit Counter Properties dialog box.
  6. Type images/image_filename in the window.

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

How to retrieve hit counter information from the Web

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 Page_name.cnt.

    Note In this file name, Page_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.
  7. In the Open With box, click Notepad, and then make sure that the following check boxes are cleared:
    • Associate files of this type with the selected program
    • Set as default
  8. 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 page_name.cnt.

    Note in this text, page_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.
  7. In the Open With box, click Notepad, and then make sure that the following check boxes are cleared:
    • Associate files of this type with the selected program
    • Set as default
  8. Click OK.

    Your hit counter statistics are displayed in Notepad.

References

For more information about how to create a custom hit counter image, click the following article number to view the article in the Microsoft Knowledge Base:
825549� How to create a custom image for the hit counter using FrontPage 2003

↑ Back to the top


Keywords: KB825497, kbhowtomaster

↑ Back to the top

Article Info
Article ID : 825497
Revision : 5
Created on : 6/1/2007
Published on : 6/1/2007
Exists online : False
Views : 302