Pageviews is a simple view counter for WordPress


If you need to display the number of views of your articles on a WordPress site, then the new Pageviews plugin will do just fine – it’s JavaScript-based, supports all caching plugins, and works efficiently even on high traffic sites.

Pageviews are far from the first plugin to count and display article views in WordPress. For a long time, there have been plugins WP-PostViews, Post View Counter, and many others, but these analogs have one (not always obvious) problem – performance.

Most of these plugins, like many third-party analytics tools, make an AJAX request to increase the view count. This is logical, but the problem is that these plugins do not take into account the fact that such a request in WordPress requires loading the entire WordPress core environment, theme, and all active plugins. Depending on the configuration, the response time of such a request can reach one second or more, and with a large number of them, the server can be completely hung up.

That is why these analogs often have topics about low performance on the support forums, especially when it comes to high-load sites. The developers of the hosting company Pressjitsu began to solve this problem.

Pageviews plugin

The Pageviews plugin itself is very lightweight and simple. It only outputs asynchronous JavaScript code in the required places to count and display the number of views.

All counting takes place on a third-party microservice and does not load the site itself in any way. This third-party service is written and optimized specifically for counting visitors, and according to the developers, the entire architecture is capable of withstanding millions of requests per day.

Change the appearance and location of the counter

By default, the Pageviews plugin displays the number of views for an article at the end of its content, but the creators have added a few useful features, filters, and events to make it easy for theme developers and site owners to place a counter where needed.

To do this, you just need to declare plugin support in your theme’s functions.php file:

add_action ('after_setup_theme', function () {
add_theme_support ('pageviews');

This will disable the standard counter display functionality at the end of each article, and you can add it to an arbitrary place using a simple event in any template of your theme, for example, single.php:

Views: <? Php do_action ('pageviews'); ?>

There are more detailed instructions for developers in the GitHub repository of this plugin.

Import, Popular Entries and more

The Pageviews developers plan to create plugin extensions that will allow you to import or synchronize statistics with other services, including Jetpack Stats, Google Analytics, and Yandex.Metrica. There are also plans to give users the ability to display popular posts based on collected statistics, live updates, and other functions.

Read More: Bento is a Free Multipurpose WordPress Theme

The Pageviews plugin is distributed free of charge under the GPL license. You can install it from the WordPress admin panel in the Plugins → Add section, or by downloading a fresh distribution from the plugins directory on

For help with installation and configuration, visit the support forums, and if you liked the plugin (or didn’t like it), then don’t forget to leave your rating in the directory.


Leave a comment

Your email address will not be published. Required fields are marked *