{"id":315122,"date":"2026-05-27T11:47:25","date_gmt":"2026-05-27T11:47:25","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/codefaeries-views-metrics\/"},"modified":"2026-05-27T11:46:32","modified_gmt":"2026-05-27T11:46:32","slug":"codefaeries-views-metrics","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/codefaeries-views-metrics\/","author":15664861,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.2","stable_tag":"1.0.2","tested":"7.0","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"CodeFaeries Views Metrics","header_author":"CodeFaeries","header_description":"Track views for any post type (posts, pages, products, custom post types). Works with or without WooCommerce.","assets_banners_color":"ecebe7","last_updated":"2026-05-27 11:46:32","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/codefaeries.com\/","header_author_uri":"https:\/\/codefaeries.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":31,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.2":{"tag":"1.0.2","author":"lwsdevelopers","date":"2026-05-27 11:46:32"}},"upgrade_notice":{"1.0.2":"<p>Recommended update \u2014 minimum PHP lowered to 7.3 (runs on more hosts) and Plugin Check compliance.<\/p>","1.0.0":"<p>Improved PHPCS compliance and WordPress Plugin Check compatibility. Recommended update for all users.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3550577,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3550577,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3550577,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3550577,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"codefaeries-views-metrics\/post-views":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"codefaeries-views-metrics\/post-views","version":"1.0.0","title":"Post Views","category":"codefaeries-views-metrics","icon":"visibility","description":"Display the view count for the current post. Part of Views Metrics plugin - track and display post views with detailed analytics.","keywords":["views","counter","statistics","metrics","cf"],"attributes":{"postID":{"type":"integer","default":0},"period":{"type":"string","default":"total"},"counterText":{"type":"string","default":""}},"supports":{"html":false,"align":true,"anchor":true,"customClassName":true,"className":true,"multiple":true,"reusable":true,"inserter":true},"textdomain":"codefaeries-views-metrics","editorScript":"cfvm-blocks-editor"},"codefaeries-views-metrics\/most-viewed-posts":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"codefaeries-views-metrics\/most-viewed-posts","version":"1.0.0","title":"Most Viewed Posts","category":"codefaeries-views-metrics","icon":"list-view","description":"Display a list of the most viewed posts with customizable period filters. Part of Views Metrics plugin for comprehensive view tracking.","keywords":["popular","views","top","most viewed","statistics","cf"],"attributes":{"title":{"type":"string","default":"Most Viewed Posts"},"postTypes":{"type":"object","default":{"post":true}},"period":{"type":"string","default":"total"},"numberOfPosts":{"type":"integer","default":5},"noPostsMessage":{"type":"string","default":"No posts found."},"displayPostViews":{"type":"boolean","default":true},"displayPostThumbnail":{"type":"boolean","default":false},"thumbnailSize":{"type":"string","default":"thumbnail"},"displayPostAuthor":{"type":"boolean","default":false},"displayPostExcerpt":{"type":"boolean","default":false},"order":{"type":"string","default":"desc"}},"supports":{"html":false,"align":true,"anchor":true,"customClassName":true,"className":true,"multiple":true,"reusable":true,"inserter":true},"textdomain":"codefaeries-views-metrics","editorScript":"cfvm-blocks-editor"}},"tagged_versions":["1.0.2"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Dashboard widget with interactive chart and statistics cards","2":"General settings page with tracking method selection","3":"Display settings for counter position and customization","4":"Exclusion settings for visitors, roles, categories, and IPs","5":"Advanced settings with IP storage and privacy options","6":"Sortable Views column in post\/product admin lists","7":"Quick Edit with inline view count editing","8":"Gutenberg blocks: Post Views and Most Viewed Posts"}},"plugin_section":[262246],"plugin_tags":[232,521,550,872,286],"plugin_category":[36,45],"plugin_contributors":[147161],"plugin_business_model":[],"class_list":["post-315122","plugin","type-plugin","status-publish","hentry","plugin_section-dashboard-widgets","plugin_tags-analytics","plugin_tags-statistics","plugin_tags-tracking","plugin_tags-views","plugin_tags-woocommerce","plugin_category-analytics","plugin_category-ecommerce","plugin_contributors-lwsdevelopers","plugin_committers-lwsdevelopers"],"banners":{"banner":"https:\/\/ps.w.org\/codefaeries-views-metrics\/assets\/banner-772x250.png?rev=3550577","banner_2x":"https:\/\/ps.w.org\/codefaeries-views-metrics\/assets\/banner-1544x500.png?rev=3550577","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/codefaeries-views-metrics\/assets\/icon-128x128.png?rev=3550577","icon_2x":"https:\/\/ps.w.org\/codefaeries-views-metrics\/assets\/icon-256x256.png?rev=3550577","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>CodeFaeries Views Metrics provides comprehensive view tracking for any post type including posts, pages, WooCommerce products, and custom post types. Built with clean, modern code architecture and extensive customization options.<\/p>\n\n<p><strong>Works with or without WooCommerce<\/strong> - This plugin is fully functional for any WordPress site, whether you use WooCommerce or not. WooCommerce integration is completely optional and provides bonus features when available.<\/p>\n\n<h4>Key Features<\/h4>\n\n<ul>\n<li><strong>Universal Tracking<\/strong> - Works with posts, pages, WooCommerce products, and any custom post type<\/li>\n<li><strong>Dashboard Widget<\/strong> - At-a-glance statistics with interactive chart on WordPress dashboard<\/li>\n<li><strong>Gutenberg Blocks<\/strong> - Post Views and Most Viewed Posts blocks for the block editor<\/li>\n<li><strong>Most Viewed Posts Widget<\/strong> - Sidebar widget to display popular content<\/li>\n<li><strong>Smart Exclusions<\/strong> - Exclude crawlers, AI bots, logged-in users, guests, specific roles, categories, or individual posts<\/li>\n<li><strong>Flexible Display<\/strong> - Show counters before content, after content, or manually via shortcode with customizable text<\/li>\n<li><strong>Role-Based Visibility<\/strong> - Control which user roles can see view counters<\/li>\n<li><strong>Role-Based Counting<\/strong> - Exclude specific roles from being counted (admins and shop managers by default)<\/li>\n<li><strong>Performance Optimized<\/strong> - Multiple tracking methods including Fast AJAX for cached sites<\/li>\n<li><strong>WooCommerce Integration<\/strong> - Sort products by most viewed on shop pages<\/li>\n<li><strong>Quick\/Bulk Edit<\/strong> - Manually adjust view counts directly from admin lists<\/li>\n<li><strong>Import Tool<\/strong> - Migrate view data from WP-PostViews or other plugins<\/li>\n<li><strong>GDPR Compliant<\/strong> - IP anonymization options and privacy policy snippet<\/li>\n<li><strong>Developer Friendly<\/strong> - Clean, well-documented code with filters and hooks<\/li>\n<li><strong>Admin Integration<\/strong> - View counts in post\/product listing pages with sorting<\/li>\n<li><strong>Real-Time Statistics<\/strong> - Dashboard showing total, today, yesterday, weekly, and monthly views<\/li>\n<\/ul>\n\n<h3>Third-Party Libraries<\/h3>\n\n<p>This plugin uses the following third-party libraries:<\/p>\n\n<h4>Chart.js<\/h4>\n\n<ul>\n<li>License: MIT License \u2014 https:\/\/opensource.org\/licenses\/MIT<\/li>\n<li>Source: https:\/\/github.com\/chartjs\/Chart.js<\/li>\n<li>Version: 4.5.0<\/li>\n<li>Usage: renders interactive charts in the admin dashboard widget and the post-list column chart modal.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>codefaeries-views-metrics<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory, or install directly through the WordPress plugin screen.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Navigate to <strong>Views Metrics<\/strong> in the WordPress admin menu.<\/li>\n<li>Configure your tracking and display settings.<\/li>\n<\/ol>\n\n<h4>Configuration<\/h4>\n\n<ul>\n<li><strong>Post types<\/strong> - Select which post types to track (posts, pages, products, etc.)<\/li>\n<li><strong>Tracking method<\/strong> - PHP (Standard), JavaScript (AJAX), REST API, or Fast AJAX (recommended for cached sites)<\/li>\n<li><strong>Unique visit throttle<\/strong> - Prevent counting duplicate views from the same user within a time period<\/li>\n<li><strong>Counter position<\/strong> - Before\/after content or manual via <code>[cfvm_views_counter]<\/code> shortcode<\/li>\n<li><strong>Exclusions<\/strong> - Exclude crawlers, AI bots, specific roles, categories, posts, or IP addresses<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20require%20woocommerce%3F\"><h3>Does this plugin require WooCommerce?<\/h3><\/dt>\n<dd><p>No. Views Metrics works with any WordPress site. WooCommerce is completely optional. When WooCommerce is installed, you get bonus features like product view tracking and a \"Sort by most viewed\" option on the shop page.<\/p><\/dd>\n<dt id=\"which%20tracking%20method%20should%20i%20use%3F\"><h3>Which tracking method should I use?<\/h3><\/dt>\n<dd><p>If your site uses a caching plugin (WP Rocket, W3 Total Cache, LiteSpeed Cache, etc.), choose <strong>Fast AJAX<\/strong>. It records views asynchronously and works correctly even when pages are served from cache. For sites without caching, <strong>PHP (Standard)<\/strong> is the simplest option.<\/p><\/dd>\n<dt id=\"how%20does%20the%20unique%20visit%20throttle%20work%3F\"><h3>How does the unique visit throttle work?<\/h3><\/dt>\n<dd><p>The throttle prevents the same visitor from inflating view counts. When set to e.g. 1 hour, a second page view from the same user within that hour is not counted. Set to 0 to count every page view.<\/p><\/dd>\n<dt id=\"is%20the%20plugin%20gdpr%20compliant%3F\"><h3>Is the plugin GDPR compliant?<\/h3><\/dt>\n<dd><p>Yes. You can choose how IP addresses are stored: full (best duplicate detection), anonymized (last octet removed), or disabled (no IP storage at all). A ready-to-use privacy policy snippet is provided under Advanced settings.<\/p><\/dd>\n<dt id=\"can%20i%20exclude%20bots%20and%20crawlers%20from%20view%20counts%3F\"><h3>Can I exclude bots and crawlers from view counts?<\/h3><\/dt>\n<dd><p>Yes. By default, crawlers (Googlebot, Bingbot, etc.) and AI bots (GPTBot, ClaudeBot, Google Extended, etc.) are excluded. You can also exclude logged-in users, guests, specific roles, categories, posts, and IP addresses.<\/p><\/dd>\n<dt id=\"can%20i%20import%20views%20from%20another%20plugin%3F\"><h3>Can I import views from another plugin?<\/h3><\/dt>\n<dd><p>Yes. Go to Views Metrics &gt; Advanced and use the Import tool. It supports WP-PostViews (<code>views<\/code> meta key), Post Views Counter (<code>post_views_count<\/code>), or any custom meta key. Preview the import before running it.<\/p><\/dd>\n<dt id=\"how%20do%20i%20display%20the%20view%20counter%20manually%3F\"><h3>How do I display the view counter manually?<\/h3><\/dt>\n<dd><p>Use the <code>[cfvm_views_counter]<\/code> shortcode. It supports attributes for period (<code>today<\/code>, <code>week<\/code>, <code>month<\/code>, <code>total<\/code>), custom text with a <code>{count}<\/code> placeholder, and more. Two Gutenberg blocks are also available: Post Views and Most Viewed Posts.<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20multisite%3F\"><h3>Does it work on multisite?<\/h3><\/dt>\n<dd><p>Yes. Views Metrics supports multisite with network-wide activation. Tables are created for each site automatically, including newly created sites.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.2 - 2026-05-11<\/h4>\n\n<ul>\n<li>Compatibility: minimum PHP requirement lowered to 7.3 \u2014 the plugin now runs on a wider range of hosts.<\/li>\n<li>Code quality: additional WordPress Plugin Check findings resolved.<\/li>\n<li>Changed: shortcode renamed from <code>[cf-views]<\/code> to <code>[cfvm_views_counter]<\/code>.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fixed: stability fixes at plugin startup \u2014 internal services now initialize reliably alongside the shared toolkit.<\/li>\n<li>Fixed: cleanup cron now scheduled correctly on activation; admin bar caches invalidated when needed.<\/li>\n<li>Fixed: Fast AJAX bootstrap and multisite hooks hardened; admin code cleanup.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Code quality: passes WordPress Plugin Check and PHPCS WordPress Coding Standards cleanly.<\/li>\n<li>Improved: input sanitization and output escaping reviewed across the codebase.<\/li>\n<li>Improved: error logging now gated behind <code>WP_DEBUG<\/code> (no log noise in production).<\/li>\n<\/ul>\n\n<h4>0.0.3<\/h4>\n\n<ul>\n<li>New: Dashboard widget with an interactive chart and statistics.<\/li>\n<li>New: Gutenberg blocks \"Post Views\" and \"Most Viewed Posts\".<\/li>\n<li>New: \"Most Viewed Posts\" sidebar widget.<\/li>\n<li>New: Quick Edit and Bulk Edit support for view counts.<\/li>\n<li>New: import tool for migrating from WP-PostViews and similar plugins.<\/li>\n<li>New: IP anonymization modes (full, anonymized, disabled) and a privacy-policy snippet generator.<\/li>\n<li>New: sortable Views column in admin post lists.<\/li>\n<li>Improved: admin UI with modern pill-style tabs.<\/li>\n<\/ul>\n\n<h4>0.0.2<\/h4>\n\n<ul>\n<li>Changed: shortcode renamed from <code>[post-views]<\/code> to <code>[cf-views]<\/code>.<\/li>\n<li>New: shortcode attributes \u2014 <code>period<\/code>, <code>text<\/code>, <code>hide_zero<\/code>, <code>class<\/code>.<\/li>\n<li>New: \"Exclude roles from count\" setting.<\/li>\n<li>New: WooCommerce \"Most viewed\" sort option.<\/li>\n<li>Improved: default exclusions now cover crawlers, AI bots, administrators, and shop managers.<\/li>\n<li>Improved: counter hides automatically when count is zero.<\/li>\n<li>Fixed: Fast AJAX tracking mode.<\/li>\n<\/ul>\n\n<h4>0.0.1<\/h4>\n\n<p>First release. Tracks views across post types with bot detection, role-based visibility, shortcodes, a statistics dashboard, and WooCommerce integration.<\/p>","raw_excerpt":"Lightweight post and product views tracking with dashboard stats, Gutenberg blocks, and smart exclusions.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/315122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=315122"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/lwsdevelopers"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=315122"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=315122"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=315122"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=315122"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=315122"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=315122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}