b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Back-office Reference
  3. Collections
  4. Contents
  5. Post Concepts
  6. Post Views Counting

Post Views Counting

The views counting feature was removed in b2evolution 5.1+.

This feature has moved to an external plugin

A similar feature is now available in an external plugin that you might want to use if you really want this feature: View Count Plugin. (Note: this plugin is not part of the official b2evolution distribution).

Another possible alternative

In case you’re interested in tracking views from your registered users, b2evolution actually allows to track who viewed what and can display that information through a widget (Seen By Widget). This is a much more precise system as it really counts only one view per user. The trade-off is that it tracks only logged-in users (because non-logged in users are virtually impossible to identify accurately, let alone trying to filter out spam bots, see below…)

Why was general view counting removed from the core in b2evo 5.1+?

The goal of this feature was to count real views and not robot views or repeat views.

To do that, this feature required heavy access to the hit log in order to deduplicate views, exclude robots, etc. This feature alone created a heavy load on SQL servers which in turn lead to many users having their web-hosting accounts suspended. On more popular sites running on dedicated servers, this feature was responsible for limiting the performance of these websites.

This kind of feature was just too heavy in terms of required processing power to make sense to maintain.

If you need a feature like this we recommend outsourcing the counting to a specialized analytics package like Google Analytics (free) which is heavily optimized for doing the counting without creating any load on your server.

You can also use the aforementioned plugin, which is a bit more optimized than the precious system, and which also doesn’t try to deduplicate.


For versions prior to b2evolution v5.1:

WARNING: Enabling "smart view counting" may dramatically slow down your site if you have heavy traffic.

Here is how b2evolution counts views on posts when "smart view counting" is turned on:

  1. If the user is anonymous, multiple reloads of a single page (URL) from a given IP will only be counted once every x seconds, depending on the "Reload-Page timeout" setting in Collections Timeouts. b2evolution checks the hit log table to detect page reloads from the same IP and ignores same IP + same URL duplicates within a certain time frame (as defined by "Reload-Page timeout").

  2. If the user is logged in, multiple reloads of a single page (URL) from a given user session will only be counted once per session. b2evolution joins the hit log and session tables to detect page reloads from the same user session and ignores them.

Note: In earlier versions, b2evolution was counting one view per user, not one view per session. This was changed in version 4.1.

Note: In earlier versions, there was a bug preventing view counts when page caching was used. This was fixed in version 4.1 by adding a list of post_IDs to increment when displaying a page from the cache. The mechanism described in 1) still applies though.

Tags: 7.0.2
Created by fplanque • Last edit by fplanque on 2020-06-09 00:24 • •

No feedback yet

On this page

  • This feature has moved to an external plugin
  • Another possible alternative
  • Why was general view counting removed from the core in b2evo 5.1+?
  • For versions prior to b2evolution v5.1:

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
    • Site
    • Collections
      • Collection Dashboard
      • Contents
        • Post Browsing Screens
        • Post Edit Screen
        • Short Tags Reference
        • Post Concepts
          • Front & Back-Office Edit Screens
          • Image / Attachment Positions
          • Visibility statuses
          • Intro and Featured Posts
          • Post Views Counting
          • HTML Validator
          • My users do not have access to the files section / upload
          • Plugin API for item settings
          • Workflow Panel
          • Intro Post
        • Mass Edit
        • Mass Post Contents
        • Other post actions
        • Renderers Reference
      • Comments
      • Categories
      • Features
      • Skins
      • Widgets
      • Settings
      • Creating a new collection
    • Files
    • Analytics
    • Users
    • Messages
    • Emails
    • System
    • Working with Results Tables
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Open-Source CMS

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque