Export (0) Print
Expand All

Use FrontPage Extras to Count Visitors & Create a Site Map with FrontPage

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Microsoft Web Builder
A Publication of The Cobb Group
Published November 1997

If you're just beginning to create your own HTML pages (or even a fully deployed Web site), you'll find it's surprisingly easy to do if you have Microsoft FrontPage 97. While FrontPage Editor lets you design Web pages visually even if you don't know a single HTML code, FrontPage server extensions (WebBots) are just as handy when you need custom features.

Page hit counters are clever and popular tools you can use to count visitors and add a personal touch to a Web page at the same time. For example, in addition to a simple greeting, you can add the line, "You are visitor number 10000" to your page.

A number of available third-party CGI applications are available for you to add a visitor counter to your page; you can also extend the functionality of a FrontPage Web server by using Hit Counter. The advantage of using Hit Counter is that since it's a FrontPage component, you don't have to rely on an external Web server; it also works well with the other FrontPage elements. Hit Counter is one of the free FrontPage 97 WebBot add-ons you can easily configure to run on your web. If you run either Internet Information Server with FrontPage extensions or Microsoft/FrontPage Personal Web Server, you can use Hit Counter.

Hit Counter is available with the Trial version of FrontPage on TechNet or for download free of charge from the FrontPage Web site at http://www.microsoft.com/frontpage. In this article, we'll show you how to install Hit Counter on your existing Web server. Then, you can add your own visitor counter to your Web pages from the FrontPage Editor—with just a mouse click.

On This Page

Counting the hits
Installing the program
Open the web
Adding the counter
Create a site map with FrontPage
At the site
Create a new page
Adding TOC
Conclusion

Counting the hits

In our example, we're using Microsoft Windows NT and Internet Information Server to run our Web, so we've focused the instructions on that configuration. However, as we mentioned, you can use Hit Counter on your personal Web server as well. We'll first install the Hit Counter to our Web server and configure it to run the main program, FPCOUNT.exe.

We'll then open the web in FrontPage Editor and edit our main page, DEFAULT.htm, in order to display the page-hit count. When we're finished, our page will look like Figure A.

Cc750880.mit97b3a(en-us,TechNet.10).gif

Figure A: A page hit counter adds a personal touch, as well as functionality, to your Web page.

Before we start, let's download the self-extracting FPHITCNT.exe file from the FrontPage Web site and save it in a temporary folder in the server. This installation file contains the main program file, FPCOUNT.exe, and other necessary libraries for the server. Once you've completed this step, you're ready to install the software and configure the server.

Installing the program

Prior to running the installation, create a new folder named _VTI_BOT in your Web server's root directory. For example, we've created the folder under C:\InetPub\wwwroot for our server. If you're using Microsoft Personal Web Server, use C:\WebShare\wwwroot. In the case of FrontPage Personal Web Server, use C:\FrontPage Webs\Content as the location for your new folder.

Now in the new folder, create a subfolder named FPCOUNT. Once you've created the folders, double-click on the downloaded executable file, FPHITCNT.exe, to run the installation. When you do, the program will display the FrontPage Hit Counter Setup dialog box, as shown in Figure B. Check the Manual Installation radio button and enter the path for the new subfolder you've just created, for example, C:\InetPub\wwwroot\_vti_bot\fpcount, and click OK. The program will extract the necessary files, add them to the folder you've specified, and display a message box confirming the installation.

Figure B: For manual installation, you need to specify the path for the main program file.

Figure B: For manual installation, you need to specify the path for the main program file.

Locate the CGI-BIN folder for your Web (usually directly under the root Web) and copy the FPCOUNT.exe file to it from the FPCOUNT folder. (Make sure the CGI-BIN folder is executable). That's it! Our Hit Counter installation is complete. We're now ready to open the Web in FrontPage Explorer.

Open the web

We need FrontPage Explorer to refresh the web and recognize the new folders we've created. Start FrontPage Explorer and open the root web. Now, select Recalculate Hyperlinks from the Tools menu. FrontPage will display a Recalculate Hyperlinks message box, as shown in Figure C. Click Yes to start the operation. FrontPage Explorer will do its part: Refresh the Web and recalculate all the hyperlinks.

Cc750880.mit97b3c(en-us,TechNet.10).gif

Figure C: You'll need to run the Recalculate Hyperlinks operation before using Hit Counter.

Once FrontPage Explorer finishes, double-click on DEFAULT.htm to open it in FrontPage Editor. We're now ready to use the Hit Counter Bot.

Adding the counter

To add the visitor counter, simply position your cursor where you want the counter to appear and select WebBot Components...from the Insert menu. From the resulting Insert WebBot Component list box, highlight Hit Counter, as shown in Figure D, and click OK to add the counter.

Figure D: From the FrontPage Editor, you can add a visitor counter as a FrontPage WebBot.

Figure D: From the FrontPage Editor, you can add a visitor counter as a FrontPage WebBot.

FrontPage will now display the WebBot Hit Counter Properties dialog box, as shown in Figure E. FrontPage gives you a total of five pre-designed counter images to choose from. You can also add your own images to match your overall design goal.

Figure E: You can select one of five ready-made counter designs from FrontPage.

Figure E: You can select one of five ready-made counter designs from FrontPage.

For this example, we'll simply select the third one by clicking on its radio button. You can define where you want the count to start by selecting the Reset Counter To check box, then entering a number in the corresponding input box. This step is especially helpful if you've had your site up for a while and you want the counter to start at a number other than zero. You can also specify the number of digits to be displayed by selecting the Fixed Number Of Digits check box. After you're satisfied with your entry, click OK to accept the values.

Once FrontPage returns to the main editing window, you'll notice FrontPage Editor doesn't show the page counter in real time; instead, it displays a banner that reads, "Hit Counter." Save the file and open it in Internet Explorer. You'll see the page counter set to 1.

To test the program, refresh the page and you'll notice that this time, the counter displays 2. Congratulations! You have a working visitor counter for your web!

Create a site map with FrontPage

Site maps are useful features of a Web site especially on a large site. A site map lets your visitors view the site's content at a glance without having to look for a specific item. A good site map simply lists the content of the entire site, preferably in a hierarchical structure. Unfortunately, if you have a large site, maintaining a site map can be a chore, since you'll have to keep track of every page and subpage in order! However, that maintenance problem all but disappears if you're using FrontPage.

By using FrontPage's Table of Contents (TOC) WebBot, you can create and maintain a site map with ease and flexibility. The TOC Bot uses FrontPage server extensions to create the list of contents dynamically, so you'll never have to update the list manually. Therefore, any time you add a new document to your site, the server extensions will add it to the TOC list automatically. In this article, we'll show how to use the TOC Bot to create a site map like the one you see in Figure F.

Cc750880.mit97b3f(en-us,TechNet.10).gif

Figure F: We've created a site map using the FrontPage WebBot.

At the site

You can build a site map at any point during your Web-authoring process. However, we prefer to build the site map at the end of our process. One advantage of doing so is that since TOC Bot uses the actual page titles to create the list, it's easy to detect any redundancies or mistakes in a page title. This way, you don't end up with two ABOUT US pages or a page entitled NEW PAGE!

For our example, we'll create a site map for one of our existing Web sites, which we've named WebBuilder. In this site, we'll simply create a new page using the FrontPage Editor and insert the TOC Bot from the program menu. We'll then set some properties for the TOC Bot to make it work for our site. To begin, switch to FrontPage Editor from FrontPage Explorer.

Create a new page

Choose New... from the File menu to create a new page. FrontPage will now display the New Page dialog box, shown in Figure G. Highlight Normal Page from the Template Or Wizard list and click OK.

Figure G: You can use the Normal Page template to create a new page.

Figure G: You can use the Normal Page template to create a new page.

FrontPage will return to the main editing window and display a blank page. Type Site Map as the heading for the page. At this point, you can add any special text or graphics you want for this page. Once you're done, you're ready to include the TOC Bot.

Adding TOC

To add the TOC Bot, first select WebBot Components...from the Insert menu. From the resulting WebBot Components dialog box, highlight Table of Contents and click OK. FrontPage will now display the WebBot Table of Contents Component Properties dialog box similar to the one you see in Figure H.

Cc750880.mit97b3h(en-us,TechNet.10).gif

Figure H: You use the Table of Contents Component Properties dialog box to set your TOC properties.

The Bot assumes that the start page of your Web is INDEX.htm and automatically inserts it as the starting point of the Table of Contents. If your art page has a different name, as in our case, you need to substitute the correct page name here—we've entered DEFAULT.asp. You can leave the default values for the rest of the parameters in the box; however, mark the Recompute table of contents when any other page is edited check box. This way, our site map will dynamically regenerate each time we update the site. Click OK to accept the changes and return to the main editing window. You'll notice that FrontPage Editor now displays a dummy table of contents, as shown in Figure I.

Cc750880.mit97b3i(en-us,TechNet.10).gif

Figure I: FrontPage Editor creates a dummy table of contents.

At this point, we're finished with our site map. Although it appears that the FrontPage Bot wasn't able to generate any information, it actually has done its job in the background. To test the results, simply save the file as SITEMAP.htm and open it in Internet Explorer. The result should look like Figure F.

Conclusion

FrontPage comes feature-rich right out of the box. As we've demonstrated, you can create a site map for your Web site with a built-in FrontPage WebBot. When you need extra functionality, such as a visitor counter, you can enhance FrontPage's flexibility with Microsoft's free add-ons.

The article entitled "Use FrontPage Extras to Count Visitors" was originally published in Microsoft Web Builder, November 1997. Copyright © 1997, The Cobb Group, 9420 Bunson Parkway, Louisville, KY 40220. All rights reserved. For subscription information, call the Cobb Group at 1-800-223-8720.

We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as is," without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement , and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft