Saturday, April 23, 2011

Web Site Traffic Monitors

Have you ever wondered about those counters that appear at the bottom of some web sites that display the number of visitors to the site? The subject has lingered in the back of my mind for several years, but I never pursued the matter until recently.

In the course of doing so, I found at least two separate and distinct ways to monitor traffic volume on web sites:
  • Visible odometer display
  • Invisible behind-the scenes statistics:
    Google Analytics
Let's take a look at each of these in turn:

Visible odometer display

I was initially discouraged: almost all sites offering free counters required users to register with a userid and password and/or provide an e-mail address, which I view as an invitation for their spam to rain down upon me. I finally stumbled upon a reasonable site that met my requirements called HitWebCounter.

This site offers fifty odometer designs from which to choose, but none of them were very appealing visually. However, the service is free, requires no registration or e-mail address, and is very easy to use. Simply choose one of the odometers and fill in fields with the following information:
  • web page name (i.e., your site's URL)
  • starting count (typically zero)
  • number of digits for the odometer to display (select a number from 1 to 9 from a pull-down menu complete with leading zeros)
  • counter type: select "Page Views" or "Unique Visitors"
[Note: there is also a pull-down menu labeled "Select Category" that does not seem to contribute much because the only selection available is "Any Category."]

After you make all of your selections, click on the button labeled "GET YOUR COUNTER CODE." A window will then appear with the applicable HTML code snippet. Simply copy the code and paste it into your web site code in the appropriate place where you wish the odometer to appear.

Keep in mind that with this method, all counts are maintained on the vendor's servers. If those servers malfunction, at best your web site might display an ugly rectangle where the counter should be and at worst might slow down and/or lock up altogether.

On the plus side, this method works whether your site is hosted by Google sites or a more conventional vendor like Comcast or Verizon. On my family web page hosted by Comcast, I placed a counter not only on the parent home page but also on all of the sub-pages: my favorite free software, my children's favorite game sites, my resume, and a page featuring my high school teachers. That way, I can determine which specific page(s) out of the entire web site is/are attracting the most visitors—if any!

Furthermore, the counting process will begin immediately after you post the new code to your site. The visible counter will change as soon as you or any other person visit the site or simply click the refresh button. This instant feedback is in stark contrast to Google Analytics discussed in the following section.

Invisible behind-the scenes statistics:
Google Analytics

Google Analytics also accumulates web site usage data albeit in a somewhat different manner. I does keep its statistics on its own set of servers much like HitWebCounter discussed above and many similar sites. However, it does not place an odometer or any other visible device onto your web page. It does offer a more comprehensive set of statistics, including not only the raw number of visitors but also the percentage of new visitors, number of page views, and average time spent on site per visitor.

In the absence of a visible counter, you must instead access web site usage data by logging on to Google Analytics at http://www.google.com/analytics/. If you do not have a Google account, you must first create one. However, if you already use Gmail, individualized Google search (iGoogle), Google's web site hosting, or any of the other Google services, then you already have an account that will provide you with access to Google Analytics.

Assuming that you have already established a Google account, go to the site http://www.google.com/analytics/
and click on the link "Access Analytics." In the next window, enter your Google e-mail address and password in the usual way.

To create a profile for your own specific web site,
  • Click the link labeled "+ Add new profile"
  • In the resulting window,
    1. insert your web site's URL (without the "http://") in the first field
    2. select your country in the second field ("United States" will already be the default entry
    3. select your time zone from the pull-down menu in the third field
  • Click the "Finish" button to save your work
Next, a "Tracking Code" page will appear. If your web page is hosted by Google's own sites.google.com, then the Web Property ID number appearing in the upper half of the page is relevant to you. The number will be of the format "UA-XXXXXXXX-S" where the X's are digits from 0 to 9 and "S" is a sequence number. Copy the entire assigned ID number into your computer's clipboard memory (Windows terminology) and then perform the following steps:
  • Log on to your Google web site
  • Click "More actions | Manage site"
  • In the menu to the left, click "Site settings - General"
  • In the window to the right, locate "Statistics"
  • Check the box "Enable Google Analytics for this site"
  • Now paste the account id into the field "Paste your Analytics Web Property ID here:"
  • Click the "Save Changes" button at the bottom of the page
On the other hand, if your web page contains your own more traditional HTML code and is hosted by an ISP like Comcast or Verizon, then the bottom half of the "Tracking Code" page contains the information relevant to you. There are two fields, the second of which provides the code that users must copy-and-paste onto every HTML page they wish to track. The code should appear in the header section immediately before the closing </head> tag. Either edit the files on site or, if you edit them off-line, upload the edited files to your host ISP site.

When you return to the "Overview" page, your URL(s) will appear by default under the "Name" column. This is redundant because the URL also appears in the profile heading.

Fortunately, there is a way to assign a more descriptive profile name. In the far right column of each profile data row, you will see a link labeled "Edit." When you click this link, another window will appear that displays four sections, each of which has its own "Edit" button in the upper right corner.

The first section will be labeled "Main Website Profile Information." Click that section's "Edit" link to access the page entitled "Edit Profile Information." The first field is labeled "Profile Name." Type any meaningful name (e.g., "Family Web Page," Children's Favorite Game Sites," "Gateway to Heaven," etc.) Click the "Save Changes" button at the very bottom of the page.

Presto chango! Now when you return to the "Overview" section, your meaningful new description will appear in the "Name" column instead of the URL.

Be advised that Google's on-line instructions warns users that it might take as long as 24 hours before any data begins to appear in the Data Analytics reports. Well, it all depends. I created my profiles on a Monday and visited my sites at least once every day. I was dismayed that by Friday, all of my counts still showed a big, fat zero.

But then I am an idiot. By default, my children and I have JavaScript disabled as a security measure. We selectively activate JavaScript only on sites that we trust and only when we need it for the site to behave properly. Because my web pages heretofor have not needed JavaScript to function, JavaScript remained disabled in our browser when visiting our family web site. Well, guess what? The code that Google Analytics requires users to copy-and-paste into their web site's HTML code happens to be, of all things, JavaScript code.

With this in mind, it stands to reason that the statistics will not register with JavaScript disabled! When I finally came to this forehead-slapping realization, I again accessed my sites, only this time with JavaScript enabled. Sure enough, within just moments, the status in Google Analytics changed from "Waiting for Data" to "Receiving Data." And most importantly, meaningful non-zero statistics began to appear within the stipulated 24 hours. Life is good!

Comparison: Odometer Display vs. Google Analytics

Here is a quick summary of the differences between odometer measuring devices like HitWebCounter and behind-the-scenes statistical gathering devices like Google Analytics:
  • HitWebCounter provides a visible device in the form of an odometer/counter. Google Analytics has no device that is visible on the user's web page; users must instead log on to Google Analytics to view statistics
  • HitWebCounter provides instant gratification by displaying counts almost immediately after installation. By contrast, Google Analytics involves a waiting period of up to 24 hours to view initial data.
  • HitWebCounter records all visitors to a site, even those with JavaScript disabled. As I learned from bitter first-hand experience, Google Analytics does not record visitors unless their JavaScript is fully enabled.
  • And now for the big trade-off: HitWebCounter odometers record only aggregate counts of one statistic, usually a simple visitor count. Google Analytics, on the other hand, provides a far more comprehensive set of statistics including but not limited to the total number of visitors, the number of unique visitors, the number of page views, and average time viewers spend on each site. Furthermore, Google Analytics data can be displayed in graphical format by day, month, or year.
It falls upon each individual webmaster to select the method that best suits his or her needs.

Finally, the steps I have described above are really not as difficult to implement as my ramblings might lead you to believe. Most of the processes involved will become abundantly clear when you actually visit the respective sites. Rest assured: if a simpleton like me can get these techniques to work, then none of you savvy readers out there will have any problems.

No comments:

Post a Comment