Understanding and configuring blog hits and visits
Understand how blog hits and visits are calculated and how you can modify the way each count is done.
If you are trying to gather data on how many times a blog entry is accessed, you can consider two metrics:
- Visits count the total number of times a blog entry is accessed, including clicks from another page in the same blog.
- Referrer hits also count how many times a blog entry is accessed, but provides more information about where the hits come from. To view referrer hits, choose Settings for a blog, then click Referrers.
- Edit the roller.properties file from this location: IBM\WebSphere\AppServer\profiles\<profile_name>\installedApps\<cell_name>\Blogs.ear\blogs.war\WEB-INF\classes
- Set referrer.ignoreSelfReferer to true.
- Save your changes and restart the Blogs server for changes to take effect.
Referrer hits
- Direct hits with no referrer information available
- URL hits with referrer information available
- 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
- A blog or blog entry is selected from within Connections
- 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.
- Edit the roller.properties file from this location on the deployment manager node: IBM\WebSphere\AppServer\profiles\<profile_name>\installedApps\<cell_name>\Blogs.ear\blogs.war\WEB-INF\classes
- Set hitcount.ignoreSelfClick to true.
- Synchronize the changes from the deployment manager to the nodes.
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.
Behavior 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 nor the visit count is incremented.
Prior to IBM® Connections 3.0, the behavior when a cache proxy was in use was as follows: when a request was processed by the application server and the request header contained "If-Modified-Since", the server checked for updates. If there were no updates, a return code of 304/SC_NOT_MODIFIED was issued and the visit count remained the same. This is one case where the referrer count increased, but the visit count did not. This rule can be useful so that when a user keeps refreshing the page without clearing the cache, the visit count is not 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. In the current implementation, the referrer count and visit count will be increased even in the 304 response case.
- Edit the roller.properties file from this location: IBM\WebSphere\AppServer\profiles\<profile_name>\installedApps\<cell_name>\Blogs.ear\blogs.war\WEB-INF\classes
- If the user does not want the visit count to be increased if page is served from browser side cache (304 not modified), set hitcount.ignore304 to true. The default value of this configuration is false.
- If the user does not want referrer counts to be increased if page is served from browser side cache (304 not modified), set referrer.ignore304 to true. The default value of this configuration is false.
- Synchronize the changes from the deployment manager to the nodes.