CodeFaeries Views Metrics – Post and Product Views Counter
Post views counter for WordPress and WooCommerce: track views on posts, pages and products, with dashboard stats and bot exclusions.
Install in
CodeFaeries Views Metrics is a post views counter for WordPress and WooCommerce. It counts the views of your posts, pages, WooCommerce products and any custom post type, shows the count where you want it, and gives you the numbers in your WordPress dashboard.
Works with or without WooCommerce – The plugin is fully functional on any WordPress site. WooCommerce integration is optional: when WooCommerce is installed, product views are tracked and the count is shown on product pages.
Count views
- Any post type – Posts, pages, WooCommerce products and custom post types, chosen in the settings
- Three tracking methods – PHP (standard), JavaScript (AJAX) and REST API; the asynchronous methods keep counting correctly on sites served from a cache
- Unique visit throttle – Set a time window so a second view from the same visitor is not counted
- Real-time statistics – Total, today, yesterday, weekly and monthly views
Display the view counter
- Before or after the content, or anywhere with the
[cfvm_views_counter]shortcode and your own text - Clean counter style – An eye icon before the count, in your theme’s colours; switch the icon off in the Display tab
- Two Gutenberg blocks – Post Views and Most Viewed Posts
- Most Viewed Posts widget for your sidebar
- Dashboard widget with an interactive chart and statistics cards
- Views column in the post and product admin lists, sortable, with a chart per post
- Role-based visibility – Choose which user roles see the view counter
Keep the counts clean
- Crawlers and AI bots excluded by default (Googlebot, Bingbot, GPTBot, ClaudeBot, Google Extended and others)
- Exclude logged-in users, guests, specific roles, categories, individual posts or IP addresses
- Role-based counting – Administrators and shop managers are not counted by default
- Quick Edit and Bulk Edit – Adjust a view count by hand from the admin lists
Views Metrics in your WordPress
- Import tool – Migrate view data from WP-PostViews, Post Views Counter or any custom meta key, with a preview before the import runs
- GDPR – Choose how IP addresses are stored: full, anonymized (last octet removed) or not at all, and generate a privacy policy snippet
- Multisite – Network-wide activation, tables created for every site, including new ones
- Developer friendly – Clean code with filters and hooks
Views Metrics Pro
- Analytics dashboard – Top 10 most viewed posts and pages, sparkline trend charts per post, views by device type and browser, traffic source breakdown
- Detailed reports – Views by date, by post and by author, daily, weekly and monthly breakdowns, post type comparison, custom date ranges
- Data export – CSV and XML, summary or full detail, filtered by date range and post type
- 3 counter themes (Badge, Minimal, Popular) and display rules per post type, page type and period
- Page builder integrations – Elementor, Divi and GenerateBlocks ordering by views
- WooCommerce sorting by views
- Author and taxonomy views – Count and display views for authors and taxonomy terms
- Fast AJAX counting, dynamic loading for cached pages, cookieless mode and AMP support
Do you like Views Metrics?
A review on wordpress.org helps other site owners find it: leave a review. Thank you.
Third-Party Libraries
This plugin uses the following third-party libraries:
Chart.js
- License: MIT License — https://opensource.org/licenses/MIT
- Source: https://github.com/chartjs/Chart.js
- Version: 4.5.0
- Usage: renders interactive charts in the admin dashboard widget and the post-list column chart modal.
Select2
- License: MIT License — https://opensource.org/licenses/MIT
- Source: https://github.com/select2/select2
- Version: 4.0.13
- Usage: enhances the searchable dropdowns on the plugin settings page.
Written by Joobi from the project's own listing. See the source page
1.0.17 – 2026-11-20
- New: the view counter shows an eye icon before its text, in a clean style that follows your theme’s colours. Switch the icon off with “Show icon” in the Display tab.
1.0.16 – 2026-11-20
- Fixed: the Analytics, Reports and Export tabs of the settings page did nothing when clicked. Each now opens a page that says what the tab adds in Views Metrics Pro.
1.0.15 – 2026-11-20
- New: order posts by views in your own queries with
'orderby' => 'codefaeries_viewsmetrics_views'. Posts never viewed count as 0. - New: read a post’s view counts over the REST API at
/wp-json/codefaeries-viewsmetrics/v1/views/<post_id>, for published posts whose counter your site shows. - Fixed: the Advanced tab setting “Delete on deactivation” had no effect, while deleting the plugin always erased all statistics and settings. It is now “Delete all data when the plugin is deleted”, off by default: deleting the plugin keeps your data unless you tick it, and deactivating never removes anything. On multisite, the network setting works the same way.
1.0.14 – 2026-11-20
- Improved: clearer plugin name, short description and description, which now say what the plugin does, group the features and answer the questions a site owner asks before installing.
- Improved: the description now lists what the Pro edition adds.
1.0.13 – 2026-10-08
- Fixed: the Post Views block and the views counter shortcode no longer show a count for one period under the wording of another. Without a text of their own, they now say “Viewed 647 times” for all time instead of “Viewed 647 times this week”.
1.0.12 – 2026-10-08
- Compatibility: requires WordPress 5.6 or later. The plugin already relied on functions missing from earlier versions.
- Fixed: in the block editor, the Post Views block sits in the content column like the other blocks instead of against the left edge.
- Fixed: the Post Views and Most Viewed Posts blocks now apply their alignment, HTML anchor and additional CSS class on the site.
- Fixed: the Views Trend chart of the dashboard widget no longer draws the remaining days of the current month as zero views.
- Fixed: the “Anonymized” choice of the IP address storage setting is no longer cut off.
1.0.10 – 2026-10-06
- Fixed: the “Visit plugin site” link, the “Views Metrics Pro” link in the help tab and the “Upgrade to Pro” button of the cache warning now open the Views Metrics product page; the last two led to a missing page.
- Compatibility: tested with WordPress 7.1.
1.0.9 – 2026-10-05
- Improved: the bundled admin toolkit is updated to its latest release. No change to features or settings.
1.0.8 – 2026-10-02
- Improved: the bundled admin toolkit is updated to its latest release. No change to features or settings.
1.0.7 – 2026-10-02
- Improved: the plugin no longer ships the usage statistics code of its shared admin toolkit; that code was never active in this edition.
- Improved: the bundled admin toolkit is now a published release instead of a development snapshot.
- Includes the 1.0.5 fixes below, which were not published on WordPress.org.
1.0.5 – 2026-10-01
- Fixed: the “Post Views” and “Most Viewed Posts” blocks, the “Most Viewed” widget and the admin bar quick stats were not loaded; they are available again.
- Fixed: the views chart opened from the post list now draws instead of staying on its loading spinner.
- Fixed: the dashboard widget chart no longer stays on its loading spinner.
- Fixed: “Top Posts This Month” skips deleted posts and shows a message when there is nothing to list.
- Fixed: the “Total” label in the post views chart window is readable.
- Fixed: settings reserved for the Pro edition are no longer changed by saving or resetting settings in the free edition.
- Fixed: with the JavaScript or REST tracking method, a content blocker could block the tracking script because of its file name, and those views were not counted.
- Improved: the tracking script is no longer loaded when the PHP tracking method is used, since it is not needed there.
- Changed: media attachment pages are no longer tracked by default. The settings page never offered them, and saving the General tab already turned them off.
1.0.3 – 2026-06-16
- Fixed: a PHP notice on the settings page on sites without WooCommerce — the searchable dropdowns now load their own library instead of relying on WooCommerce.
- Fixed: the tracking method description was cut off and now explains which method to use with a caching plugin.
1.0.2 – 2026-05-11
- Compatibility: minimum PHP requirement lowered to 7.3 — the plugin now runs on a wider range of hosts.
- Code quality: additional WordPress Plugin Check findings resolved.
- Changed: shortcode renamed from
[cf-views]to[cfvm_views_counter].
1.0.1
- Fixed: stability fixes at plugin startup — internal services now initialize reliably alongside the shared toolkit.
- Fixed: cleanup cron now scheduled correctly on activation; admin bar caches invalidated when needed.
- Fixed: Fast AJAX bootstrap and multisite hooks hardened; admin code cleanup.
1.0.0
- Code quality: passes WordPress Plugin Check and PHPCS WordPress Coding Standards cleanly.
- Improved: input sanitization and output escaping reviewed across the codebase.
- Improved: error logging now gated behind
WP_DEBUG(no log noise in production).
0.0.3
- New: Dashboard widget with an interactive chart and statistics.
- New: Gutenberg blocks “Post Views” and “Most Viewed Posts”.
- New: “Most Viewed Posts” sidebar widget.
- New: Quick Edit and Bulk Edit support for view counts.
- New: import tool for migrating from WP-PostViews and similar plugins.
- New: IP anonymization modes (full, anonymized, disabled) and a privacy-policy snippet generator.
- New: sortable Views column in admin post lists.
- Improved: admin UI with modern pill-style tabs.
0.0.2
- Changed: shortcode renamed from
[post-views]to[cf-views]. - New: shortcode attributes —
period,text,hide_zero,class. - New: “Exclude roles from count” setting.
- New: WooCommerce “Most viewed” sort option.
- Improved: default exclusions now cover crawlers, AI bots, administrators, and shop managers.
- Improved: counter hides automatically when count is zero.
- Fixed: Fast AJAX tracking mode.
0.0.1
First release. Tracks views across post types with bot detection, role-based visibility, shortcodes, a statistics dashboard, and WooCommerce integration.
Follow this listing's changes (Atom feed)