|
| | |  | FrontPage How-To Articles |
| | | | How can I make a "hidden" hit counter for a Web page? |
| Sometimes you want a hit counter on a page, but you don't want visitors to see it. Here's a way to do that with FrontPage. First, you need two counter graphics, a regular, numbered graphic, and a "blank" graphic. I've created samples which you can use in your own site. To save them to your hard disk, click on each with the right mouse button and choose "Save Picture As..." (note: I put an HTML border around the "blank" counter, so you can tell where it is). | Regular counter:
 | "Blank" counter:
 |
| - First, import the two graphics into your FrontPage web. In FrontPage choose View > Folders, then choose File > Import... and locate and import the two counter graphics (you should import them to the same folder of your web as the page you want to add the counter to).
- Open the page you want the counter on. Position the blinking insertion point where you want the counter to appear (usually at the bottom), then choose Insert > Component > Hit Counter...
- In the Hit Counter Properties dialog box, click the Custom Picture radio button, then enter generic_counter.gif for the value (the name of the above counter). Click OK.
- Save and close the page. If you're editing your website on your local hard disk, you should Publish your website to your Web server at this point.
- Open the page with the counter on it in your Web browser. Confirm that the counter is working. You can hit the Reload button in your Web browser and see if the counter increases (if the counter is visible but not increasing, hold down Ctrl and Shift on your keyboard, then click the Reload button). If it's not working: If you get the message [Hit Counter] instead of the counter graphic, your Web server does not have the FrontPage extensions installed (contact your Web hosting service for more information). If you get a "broken" graphic, you either uploaded the counter graphic to the wrong folder, or you typed the name in wrong; go back and make sure everything is how it should be.
- Next, you'll want to make a bookmark to the counter graphic in your Web browser.
For Internet Explorer: Click directly on the counter with the right mouse button. Choose "Add to Favorites..." and save the bookmark in your "Favorites" folder (when you do this, the Name field in the Add Favorite dialog box should say Hit Counter; if it doesn't, you didn't click directly on the hit counter—go back and try it again). For Netscape Navigator: Click directly on the counter with the right mouse button, then choose View Image. Click the Bookmarks button, and choose Add Bookmark. (In the Bookmarks menu, it will probably be listed as "Gif image 20x11 pixels". If you wish, choose "Edit Bookmarks...", locate the aforementioned bookmark, click on it with the right mouse button, choose "Bookmark Properties...", and enter a new name, something like "Hit Counter". Click OK, then close the Bookmarks window when you're done.) - Now that you've got a bookmark to the visible counter, let's make the counter invisible. First, open the page once again in the FrontPage editor.
- Locate the hit counter (it will probably say [Hit Counter]). Double-click on it to bring up the Hit Counter Properties dialog box.
- If you're using the above hit counter graphics (and following along correctly thus far), the Custom Picture option should be selected with a value of generic_counter.gif. Change this to generic_counter_blank.gif.
- Click OK, then save the page. If you're editing your website on your local hard disk, you should Publish your website to your Web server at this point.
- Open the page in your Web browser. It should be blank where the counter used to be. Reload the page a few times (you might want to hold down Ctrl and Shift while you're doing it).
- In your Web browser, select the bookmark you created in the above steps. You should see your hit counter, and it should have increased by the number of times you reloaded the page. If you see the hit counter but it hasn't changed, hit the Reload button in your Web browser.
<Back to table of contents> |
|  |