Understand blog likes, comments, and visits
This topic describes how the Most Liked, Most Commented, and Most Visited statistics are calculated and why the counts may differ between those found in the widgets and those found in the main page.
If we are viewing either the list of blogs or the list of blog entries from the Public Blogs page, we can view the lists of most liked, most commented, and most visited blogs or entries in sidebar widgets. We can also view these statistics for each blog or entry in the main page. There may be times when the information in the main page does not match the information in the sidebar widgets because of the way each count is calculated.
Calculating liked, commented, and visited statistics for blog entries
The statistics for the Most Liked, Most Commented, and Most Visited widgets and the Likes/Votes, Comments, and Visits statistics that display in the main page are calculated in slightly different ways.
For example, the Most Liked widget displays the most likes in the last 30 days, regardless of when the entry was published. The list of latest entries in the main page only displays entries published in the last 30 days, so the most liked entry in that list may not match the most liked entry in the widget.
- The Likes/Votes, Comments, and Visits count for an individual entry is calculated :
- Only those entries that were published within the past 30 days are displayed. We can configure the period for what entries to display by changing the value of the homepage.since property in the roller.properties file.
- The count displayed under each entry is for overall likes, comments, or visits.
- We can sort the list of entries by overall likes, comments, or visits.
- The count for an entry in the Most Liked or Most Commented widget is calculated :
- Entries display according to how many likes or comments they received in the last 30 days, regardless of when the entries were published. Likes or comments older than 30 days are disregarded.
- We can configure the period for calculating likes by changing the value of the homepage.mostRecommendedSince property in the roller.properties file.
- We can configure the period for calculating comments by changing the value of the homepage.mostCommentedSince property in the roller.properties file.
- The count for an entry in the Most Visited widget is calculated :
- The visit count is only listed for entries that have been published or updated in the last 30 days.
- The visit count is a cumulative count, not just visits in the last 30 days.
- We can configure the period for what entries display by changing the value of the homepage.mostVisitedSince property in the roller.properties file.
Calculating liked, commented, and visited statistics for blogs
Just as with blog entries, the blog statistics for the Most Liked, Most Commented, and Most Visited widgets and the corresponding statistics that display in the main page are calculated in slightly different ways.
For example, the Most Liked widget displays the most likes in the last 30 days, regardless of when the blog was created. The list of blogs in the main page only displays blogs published in the last 30 days, so the most liked blog in that list may not match the most liked blog in the widget.
- The Liked, Commented, and Visited counts for an individual blog are calculated :
- All blogs display in the main page, regardless of when they were published.
- The count displayed for each blog is for overall likes, comments, or visits.
- The count for blogs in the Most Liked or Most Commented widget is calculated :
- Blogs display according to how many likes or comments they received in the last 30 days, regardless of when the blogs were published. Likes or comments older than 30 days are disregarded.
- We can configure the period for calculating likes by changing the value of the homepage.mostRecommendedSince property in the roller.properties file.
- We can configure the period for calculating comments by changing the value of the homepage.mostCommentedSince property in the roller.properties file.
- The count for a blog in the Most Visited widget is calculated :
- The visit count is only listed for blogs that have been published or updated in the last 30 days.
- The visit count is a cumulative count, not just visits in the last 30 days.
- We can configure the period for what entries display by changing the value of the homepage.mostVisitedSince property in the roller.properties file.
The effects of caching on statistics
The cache and refresh processes can also contribute to a difference in what displays in the Most Liked widget and the likes listed in the main page of blogs or entries. The widget cache is updated every 10 minutes. This interval is not configurable. If there are no new blog entries or new blogs, the Public Blogs page is cached and will not be updated, and the user will see the counts do not match. This is due to a "if-not-modified" cache control on the Public Blogs page.
Update a property in the roller.properties file
Follow these steps to update a property in the roller.properties file:
- Edit the roller.properties file from this location: IBM\WebSphere\AppServer\profiles\<profile_name>\installedApps\<cell_name>\Blogs.ear\blogs.war\WEB-INF\classes
- Edit the values for the configuration properties to change.
- Save the changes and restart the Blogs server for changes to take effect.
Parent topic:
Administer Blogs