If you are trying to gather data on how many times a blog entry is accessed, you can consider two metrics:
- Referrer hits include the number of times a blog or blog entry is accessed from any starting point except for the blog itself.
- Visits count the total number of times a blog entry is accessed, including clicks from another page in the same blog. Note that if the page is cached, the updated visit count will only be visible when the page is refreshed.
Because the referrer hits for an entry and the visit count have different rules, the counts will not match. The two counts are also refreshed at different rates, which can affect the counts. The following sections describe how hits and visits are calculated and how the count is refreshed.
Referrer hits
Referrer hits are divided into:
- Direct hits with no referrer information available
- URL hits with referrer information available
Direct hits increment the hit tally under these circumstances:
- A blog entry is created
- A blog or blog entry is accessed via a link from an e-mail message
- The user enters the blog or blog entry URL directly into a browser
- The blog or blog entry link is selected from a Web page, but the referring server does not send the referrer information
- The blog or blog entry is accessed via a link in a feed reader
- The blog or blog entry is accessed via a link embedded in a bookmark
Important: Direct hits are not counted if the referrer URL is the same as the blog/blog entry URL. So when a user looks at a blog and navigates through each entry, it doesn't track them as referrers. Clicking a blog entry from within a blog in Connections will not increment the direct hits in the Referrers page. These rules will be configurable in Lotus Connections 3.0 so that inconsistencies can be avoided.
URL hits increment the hit tally under these circumstances:
- A blog or blog entry is selected from within Connections (but not from the same blog)
- A blog or blog entry is accessed via a link from a Web page that sends referrer information.
Visits
The count for visits counts the number of times a blog entry is accessed. The count is displayed in the blogs Web UI and is used to measure popularity and other metrics. The count includes all of the hits tallied for referrer hits to the blog entry as well as visits to a blog entry from other pages in the same blog.
Note: In Lotus Connections 2.5, the blog visit count is not incremented when the blog member accesses the blog, but the blog entry visit count is incremented when the author accesses the entry. This inconsistency will be corrected in Lotus Connections 3.0.
Caching
The way the blog pages are cached in the browser may contribute to a temporary inaccuracy in the visit count visible in the UI. The visit count is not refreshed until the web page cache expires and the page is reloaded from the application server. Under some circumstance this may require an update to some of the blog content that will cause page to reload.
Also, the visit count is increased via a backend thread in the Connections application for performance reasons. This thread only runs every 3 minutes, and processes the most recent 5000 entries. Therefore, the visit count may not be updated right away.
Limitations when cache proxy is enabled
If the user is using a cache proxy and has specified CacheMaxExpire with a specific time period, a page will be served via the cache proxy within this time period without checking the host server. Since the request is not processed by the application server there is no way to count it, so neither the referrer or visit count is incremented.
When a request is processed by the application server and the request header contains "If-Modified-Since", the server checks for updates. If there are no updates, a return code of 304/SC_NOT_MODIFIED is issued and the visit count remains the same. This is one case where the referrer count increases, but the visit count does not. This rule can be useful so that when a user keeps refreshing the page without clearing the cache, the visit count will not be increased. The exception is the author's own hit where the server returns a 200 code even when there are no new entries. This is actually a flaw that authors can exploit by logging in and refreshing the page to increase the visit count to their own blog entry. We plan to fix this in an upcoming release.
Limitations when cache proxy is not enabled.
When cache proxy is not enabled and ctrl-refresh is used, the request to the server will not include "If-Modified-Since" in the request header. As a result the user will see the visit count increase. This happens because the server will interpret the request as if there is no cache and will issue return code 200 with the latest data.