Dotcom-Monitor: MetricsView Monitoring™ Hit Counter
Overview:
The Hit Counter is a type of monitoring task within the MetricsView Monitoring™ platform of Dotcom-Monitor. The Hit Counter provides actionable monitoring information to a web site owner about the end user's experience of a web page in two key areas:
- Web Page Hits: the number of hits to a web page within a specific period of time (the time period can be every 1,3,5,10, 15, 30, 60-minutes or more)
- Web Page Load Time: the average time to load a web page within a browser for all end-users during a specific period of time (the specified time period of every 1,3,5,10, 15, 30, 60-minutes or more)
How It Works:
The Hit Counter uses a java script snippet that is installed on the monitored page. This java script snippet sends a signal to Dotcom-Monitor's MetricsView Monitoring platform each time an end user accesses the monitored web page. Dotcom-Monitor gathers these values and compares the collected information to parameters that have been set by the website owner. If the collected values fall outside these parameters, then Dotcom-Monitor initiates the error/alert process.
Use of the Hit Counter - Scenario 1:
In this Hit Counter scenario, a website owner expects between 10-100 hits to a specific web page every 60 minutes. So, the web site owner sets the Hit Counter parameters to indicate an error and send an alert when web page hits are less than <10 hits and more than >100 hits in 60 minutes. The website owner also expects the web page to load, on average, in an all end user's browser in under <5 seconds.
- Low Hits:If the Hit Counter reports that the number of hits to a web page has fallen, for example, below 10 hits during the last 60 minutes, an error is recorded and an alert is initiated. A fall in web page hits may indicate something is wrong with a web service (such as, an internet connectivity issue), or a problem with referral sites, or other issues.
- High Hits: On the other hand, if the number of web page hits should rise over >100 visitors in 60 minutes an error is recorded and the website owner is alerted. An increase in web site hits beyond set parameters may affect the server's performance during these high load cycles, may indicate a Denial-of-Service (DOS) attack is occurring, or other issues.
- Web Page Load Time: In this scenario, the Hit Counter java script snippet is set to monitor the average time it takes to load a web page within an end-user's browser over a 60 minute period. During the 60 minute time period the web page load time performance data that is sent to Dotcom-Monitor is consolidated into an average web page load time. If, for example, an end-users' experience of the web page load time is "slow" (in this scenario, on average over >5 seconds), then the Hit Counter will initiate the error/alert process. The web site owner may also utilize this aspect of the Hit Counter to monitor changes in average web page load time after changes (that may increase or decrease web page load times) are made to a web page.
Setting Up the Hit Counter within MetricsView Monitoring™
Setting up a Hit Counter is a simple three step process involving the creation of a monitored Device, selecting and configuring a Hit Counter Task for that Device, and downloading and installing the Hit Counter Script on the server and the java script snippet on the monitored web page.
-
First, Create a Monitored Device:
First, a "Device" to be monitored (such as a website) must be set-up (Figure 1.)within the MetricsView Monitoring™ platform, prior to initiating Hit Counter monitoring. During the creation of the Device the following fields are set-up:

Figure 1.: Create a Monitored Device
- Device name (ex. "yourwebsite.com")
- Data gathering time period (choose from, 1,3,5,10, 30, 60-minutes or more)
- Type(s) of Alerts (choose from, email, phone, SMS, SNMP trap, email to phone pager etc…)
- Reporting options (choose from, Email reports, online reports, real-time dashboard Report Card, real-time XML feed, .csv reports, global reports etc...)
-
Second, Choose and Configure a Hit Counter Task:
Second, after creating a Device the user must select a type of monitoring "Task." The user will select the Hit Counter task type.
Then, the user can configure the Hit Counter Task itself (see Figure 2 below). During the configuration the user will specify:

Figure 2.: Choose and Configure a Hit Counter Task
- Task name (ex. "yourwebsite.com/page1-MonUserExp."),
- Min. and Max. Hit rates (the Hit rate equals the total number of hits during the data gathering time period. If a reported Hit rate data value falls below the Min. Hit rate, or above the Max. Hit rate, an error/alert process will be initiated.)
- Maximum averaged time (in seconds) to load a web page in a browser. (This is an average web page load time for all end-users, within the specified data gathering time period set-up when the user Create a Monitored Device (see above).
- The user's Hit Counter type of Task will also generate a Global Unique Identifier (GUID) (see UID in screen shot below) that is specifically allocated for the monitored page. (Note: This GUID can be regenerated, as necessary, to ensure security.).
-
Thirdly, Download and Install the Hit Counter Script and Snippet:
Thirdly, the dotcom-collection1.js script must be downloaded from the link and placed on the server of the monitored web page. The dotcom-collection1.js script contains the java script snippet that is responsible for the calculation of web page load times. To download the code, right click on the dotcom_collection1.js link (Figure 3, see 1. below) and select "Save As". Then, place the file in a location where it may be referenced by the monitored web page.
Finally, the user will copy and paste the java script snippet code (Figure 3, see 2. below) on the web page that will be monitored, and also:
- Replace the first line, http://www.YOURcompany.com/dotcom_collection1.js with the actual path to the dotcom_collection1.js file.
- Place the java script snippet code at top of the <head> tag of your HTML page, (otherwise Load Times will not be reported properly).

Figure 3.: Download and Install the Hit Counter Script (1.) and Snippet (2.)