前言介紹
- 這款 WordPress 外掛「SQMViews」是 2026-01-31 上架。
- 目前尚無安裝啟用數,是個很新的外掛。如有要安裝使用,建議多測試確保功能沒問題!
- 上一次更新是 2026-02-01,距離現在已有 24 天。
- 外掛最低要求 WordPress 6.2 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 8.1 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
schqm |
外掛標籤
metrics | privacy | analytics | page views |
內容簡介
總結:SQMViews 是一個簡單且輕量級的追踪和分析外掛,幫助您了解訪客如何與您的 WordPress 內容互動,而不會將數據發送給第三方服務。此外,該外掛添加的負擔很少,能夠在中等大小的網站上追踪每天數百萬次的瀏覽量。
1. 如何幫助了解訪客?
- 提供近實時的網頁瀏覽追踪。
- 提供參與度指標(網頁停留時間、活躍時間)。
- 通過隱私友好的事件計數展示用戶活動(點擊、滾動等)。
2. 性能方面的特點是什麼?
- 支持經過核心加載的超快速追踪端點。
- 每個請求的負擔最小(使用 drop-in script 約 5 毫秒)。
- 基於檔案的批次處理(在網頁瀏覽事件收集期間不進行數據庫請求,僅在 cron 處理期間進行)。
3. Drop-in script 的主要特點有哪些?
- 旨在最小化負擔。
- 使用與 API 端點完全相同的代碼,除了兩個用於配置修改的鉤子。
- 嚴格運行 JSON 要求模式驗證以最小化攻擊面。
- 在批次處理之後將請求添加到文件中。記憶體和 CPU 佔用率極低。
4. 關於隱私和控制的描述是什麼?
- 該外掛是 100% 專注於隱私。
- 使用者的事件會在保存之前經過 ID 號識別。
原文外掛簡介
SQMViews is a simple and lightweight tracking and analytics plugin that helps you understand how visitors interact with your WordPress content—without sending data to third-party services.
Plugin adds very little overhead, capable of tracking millions of page views per day on a moderately sized website.
Plugin includes sqm-views-pages.php drop-in script installation (Fast endpoint) to collect pageviews without loading WordPress core, reducing pageview request from 250 ms to 5 ms. If drop-in installation is not possible, the plugin falls back to the WordPress call (API endpoint).
Key Features
Tracking & Analytics:
Near real-time page view tracking
Engagement metrics (time on page, active time)
Shows user activity (clicks, scrolls, etc.) with privacy-friendly event counting
Interactive analytics dashboard with D3.js visualizations
Historical data with daily aggregation
Filter by date range, content type, and more
Performance:
Ultra-fast tracking endpoint (bypasses a core load)
Minimal overhead (~5ms per request with the drop-in script)
File-based batch processing (no database requests during pageview event collection, only during cron processing)
Efficient data storage with automatic archiving
Configurable background processing via WP-Cron
Drop-in script
* Created to minimize overhead
* Uses exactly the same code as the API endpoint except two hooks for config modification (sqm_views_ping_interval, sqm_views_session_timeout)
* Run strict JSON request schema validation to minimize attack surface.
* Receives request, run validation, add it to a file for the later batch processing. Very low memory and CPU footprint.
Pageview lifetime
JS code will send an init event, followed by ping events and completed by exit or timeout events. Unique ID is returned during init used for all the following events. During cron processing all the events with the same IDs are combined into a single pageview and stored in the database.
Privacy & Control:
100% privacy-focused (no external services)
All data stays on your server
Encrypted tracking payloads (you don’t need to reveal everything you track)
Full control over what gets tracked
GDPR-friendly (no personal data collected by default), we focus on pageviews
Flexibility:
Track custom post types and taxonomies
30+ developer hooks for customization
WP-CLI commands for automation
Translation-ready (i18n)
REST API for integrations
What Gets Tracked?
Content Types:
* Posts and pages (configurable)
* Custom post types
* Category and tag archives
* Custom taxonomy archives
* Author archives
* Date archives
* Home page
* Search results
Engagement Metrics:
* Count – Total number of views
* Time on Page – Total time spent on page
* Active Time – Time user was actively engaged
* High-Frequency Events – User browsing on the page (scrolling, mouse movement)
* Low-Frequency Events – Deliberate actions (clicks, touches, typing)
Perfect For
Publishers monitoring content performance
Marketers analyzing user engagement
Developers needing custom analytics
Privacy-conscious site owners
Anyone wanting Google Analytics alternative
How It Works
Lightweight JavaScript tracker injected on tracked pages (inline or external)
Fast endpoint receives tracking data
File-based storage for raw data writes data to JSONL files (no database overhead)
Background processing via WP-Cron aggregates data hourly/daily and put them in the database
Interactive dashboard displays charts and metrics
Extensibility
30+ Developer Hooks:
Frontend Hooks – Control what gets tracked and how
Processing Hooks – Modify data before database storage
REST API Hooks – Customize chart data and permissions
Activation Hooks – Adjust default settings and storage
WP-CLI Support
# Process statistics manually
wp sqm-views process
Multisite Compatible
Planned
Why Choose SQMViews?
vs External Analytics:
* No external JavaScript libraries
* No tracking cookies required
* No data sent to Google servers
* Faster page loads (no external requests)
* Complete data ownership
Requirements
WordPress 6.0 or higher
PHP 8.1 or higher (PHP 8.2+ recommended)
PHP Sodium extension (for encryption)
MySQL 5.6 or higher / MariaDB 10.0 or higher
Write permissions for wp-content/uploads/sqm-views directory
Credits
SearchQueryMaster.com team
Powered by:
* D3.js for visualizations
* WordPress CMS
* Sodium crypto library
Privacy Policy
SQMViews is designed with privacy in mind. The plugin:
Does NOT collect:
* Personal information
* Cookies not required for tracking
* Sessions – there is no session tracking at the moment, only pageviews tracking
* Usernames or emails
* Browser fingerprints
IP address and user agents are:
* collected in raw log files for troubleshooting, spam, bot, and system abuse prevention
* removed from aggregated data and not used anywhere else
Does collect:
* Page URLs being viewed
* Tags and categories on the current page
* Timestamps of visits
* User interaction metrics (scrolls, clicks) counter
* Browser user-agent string (for bot filtering)
* Referrer URL (if available)
Data storage:
* All data stored on your WordPress server
* No data sent to external services
* You control data retention and deletion
Your responsibilities:
* Update your site’s privacy policy to mention analytics tracking
* Implement cookie consent if required in your jurisdiction
* Handle data subject access requests per GDPR/CCPA requirements
* Configure the plugin to exclude personal data if necessary
Support
Free Support:
* WordPress.org Support Forum
Developer Notes
Architecture:
* Namespaced PHP code (SQMViews\)
* PSR-4 autoloading via Composer
* REST API endpoints for integrations
* File-based queueing system
Database Tables:
* sqm_views_trackables – Catalog of tracked content
* sqm_views_events – Event type definitions
* sqm_views_records – Individual tracking records
* sqm_views_daily – Daily aggregated statistics
Hooks:
Hooks Reference:
Filters (apply_filters):
Tracking & Frontend:
* sqm_views_should_track – Control whether tracking should occur (2 params: $should_track, $data)
* sqm_views_tracking_data – Modify tracking data before encryption (1 param: $tracking_data)
* sqm_views_trackable_post_types – Customize which post types can be tracked (1 param: $post_types)
* sqm_views_trackable_taxonomies – Customize which taxonomies can be tracked (1 param: $taxonomies)
* sqm_views_data_taxonomies – Modify taxonomies included in tracking data (1 param: $taxonomies)
* sqm_views_encryption_key – Override encryption key (1 param: $key)
* sqm_views_tracker_endpoint – Customize tracking endpoint URL (2 params: $endpoint, $saved_endpoint)
* sqm_views_minified_js – Control whether to use minified tracker JS (1 param: $use_min)
* sqm_views_tracker_script_path – Customize tracker script file path (2 params: $path, $use_min)
* sqm_views_tracker_script_url – Customize tracker script URL (2 params: $url, $use_min)
* sqm_views_inline_js – Control whether to inline tracker JS (1 param: $use_inline)
* sqm_views_show_debug_comment – Show debug HTML comment (1 param: $show)
Processing:
* sqm_views_raw_record – Filter raw record data during processing (1 param: $data)
* sqm_views_calculated_metrics – Modify calculated metrics (2 params: $metrics, $records)
* sqm_views_session_timeout – Customize session inactivity timeout (1 param: $timeout)
* sqm_views_ping_interval – Customize ping interval for session tracking (1 param: $interval)
Dashboard:
* sqm_views_dashboard_minified_js – Control minified JS for dashboard (1 param: $use_min)
* sqm_views_dashboard_script_path – Dashboard script file path (2 params: $path, $use_min)
* sqm_views_dashboard_script_url – Dashboard script URL (2 params: $url, $use_min)
* sqm_views_dashboard_inline_js – Control inline JS for dashboard (1 param: $use_inline)
* sqm_views_dashboard_default_filters – Customize default dashboard filters (1 param: $defaults)
REST API:
* sqm_views_rest_permissions – Customize REST API permissions (1 param: $capability)
* sqm_views_rest_chart_data – Modify chart data in REST response (2 params: $data, $request)
* sqm_views_chart_cache_expiration – Customize chart cache expiration time (1 param: $seconds)
* sqm_views_rest_chart_filters – Customize available chart filters (1 param: $filters)
Activation & Settings:
* sqm_views_enable_dropin – Enable/disable drop-in file creation (1 param: $enable)
* sqm_views_default_settings – Customize default plugin settings (1 param: $settings)
* sqm_views_data_directory – Customize data storage directory (1 param: $directory)
Actions (do_action):
Activation & Upgrade:
* sqm_views_activated – Fires after plugin activation (0 params)
* sqm_views_upgraded – Fires after plugin upgrade (2 params: $from_version, $to_version)
* sqm_views_before_upgrade – Fires before upgrade process (2 params: $from_version, $to_version)
* sqm_views_after_upgrade – Fires after upgrade process (2 params: $from_version, $to_version)
* sqm_views_uninstalled – Fires during plugin uninstallation (0 params)
Tracking:
* sqm_views_before_tracker_output – Before tracker script output (2 params: $tracking_data, $tracker_config)
* sqm_views_after_tracker_output – After tracker script output (1 param: $tracking_data)
Processing:
* sqm_views_before_processing – Before statistics processing starts (1 param: $verbose)
* sqm_views_after_processing – After statistics processing completes (1 param: $processor_instance)
* sqm_views_record_processed – After individual record processed (1 param: $record)
* sqm_views_daily_aggregated – After daily aggregation completes (1 param: $result)
Cache:
* sqm_views_chart_cache_invalidated – When chart cache is cleared (0 params)
Examples
Frontend Hooks – Control Tracking Behavior:
Exclude logged-in administrators from tracking (will not work properly if you cache pages or use CDN):
add_filter( 'sqm_views_should_track', function( $should_track, $data ) {
if ( current_user_can( 'manage_options' ) ) {
return false;
}
return $should_track;
}, 10, 2 );
Modify tracking data before sending:
add_filter( 'sqm_views_tracking_data', function( $data ) {
// Add custom metadata
$data['custom_field'] = get_post_meta( get_the_ID(), 'my_field', true );
return $data;
} );
Customize which post types are tracked (overrides UI settings):
add_filter( 'sqm_views_tracked_post_types', function( $post_types ) {
// Add custom post type
$post_types[] = 'portfolio';
return $post_types;
} );
Processing Hooks – Modify Data Before Storage:
Calculate custom engagement metrics:
add_filter( 'sqm_views_calculated_metrics', function( $metrics, $records ) {
// Calculate engagement score
$metrics['engagement_score'] = ( $metrics['active'] / max( 1, $metrics['on_page'] ) ) * 100;
// Calculate bounce rate indicator
$metrics['likely_bounce'] = $metrics['on_page'] < 5 ? 1 : 0;
return $metrics;
}, 10, 2 );
Filter records before processing:
add_filter( 'sqm_views_before_process_record', function( $record ) {
// Exclude specific URLs
if ( strpos( $record['url'], '/test-page/' ) !== false ) {
return null; // Skip this record
}
return $record;
} );
REST API Hooks – Customize Chart Data:
Modify chart permissions:
add_filter( 'sqm_views_rest_permissions', function( $has_permission ) {
// Allow editors to view analytics
return current_user_can( 'edit_posts' );
} );
Activation Hooks – Adjust Default Settings:
Set custom default settings on activation:
add_action( 'sqm_views_activated', function() {
// Set default processing interval
update_option( 'sqm_views_cron_interval', 'hourly' );
// Enable external JavaScript by default
update_option( 'sqm_views_js_mode', 'external' );
} );
Cron Hooks – Custom Processing Schedules:
Run custom tasks after processing:
add_action( 'sqm_views_after_process', function( $processed_count ) {
// Send notification if processing high volume
if ( $processed_count > 10000 ) {
wp_mail(
get_option( 'admin_email' ),
'SQMViews High Volume Alert',
sprintf( 'Processed %d records', $processed_count )
);
}
}, 10, 1 );
REST API:
* POST /wp-json/sqm-views/v1/track – Submit tracking data through WordPress API endpoint
* POST sqm-views-pages.php – Submit tracking data through Fast endpoint
* GET /wp-json/sqm-views/v1/charts – Retrieve chart data
WP-CLI:
* wp sqm-views process – Process pending statistics
License:
GPLv3. See LICENSE file for details.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「SQMViews」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
WebberZone Top 10 — Popular Posts 》WordPress 沒有內建的系統可以追蹤網頁瀏覽量或顯示熱門文章。 Top 10 是一個易於使用、功能強大的 WordPress 外掛程式,可以計算您的文章、頁面和任何自訂文...。SRS Simple Hits Counter 》正如其名,這是一個非常簡單的點擊計數器,它可以計算「獨立訪客」和「頁面瀏覽量」的數量。您可以使用小工具或短代碼在網站的任何位置顯示獨立訪客或總頁面...。
Page Visits Counter – Lite 》pes to your website frontend using this plugin. The counters display the total number of visits to your website or to individual pages, respectivel...。mzz-stat 》注意:歡迎提出建議的程式碼變更/拉取請求,這裡是外掛程式的相關 Github 存儲庫:https://github.com/mjassen/mzz-stat, 這個外掛的用途, 這個外掛的目的是...。
Weblix – Online Users 》總結:這款外掛提供了一個輕量且高效的解決方案,可以在您的網站上追踪在線用戶,而無需使用JavaScript,確保不影響頁面加載速度。它提供了類似Google Analyt...。
DX2 Post Hit Counter 》這個點擊計數器是一種輕量級的方式,用於追蹤您在 WordPress 博客上的所有文章,包括自定義文章類型的點擊次數。該外掛使用 AJAX 來計算點擊次數,這意味著它...。
PV Sort Plus for Cocoon 》PV Sort Plus for Cocoon is an admin-side enhancement plugin designed exclusively for the Cocoon theme., It adds the following custom columns to the...。
CP Analytics pro 》使用 CP Analytics Pro 插件,即可即時查看網站的瀏覽量,瞭解受眾概況,檢查跳出率、社交流量、轉介流量等數據,並以圖表方式呈現。, 此外,此插件還具有以...。Author Page Views 》Author Pageviews 是一款按作者跟踪頁面訪問量並提供月度報告和CSV導出的外掛。該外掛的目標是幫助通過CPM廣告賺錢的內容發佈者更好地跟踪和補償他們的作者。...。
RW PostViewStats Lite 》總結:RW PostViewStats Lite 提供準確的文章、頁面和自訂文章類型的瀏覽追蹤,設計用於提高效能和隱私保護。, , 問題與答案:, 1. RW PostViewStats Lite 主...。
Total Views 》總結:Total Views 是一個輕量級的 WordPress 外掛,能夠計算總瀏覽數並使用 [total_views] 短代碼在任何地方展示。它具有許多特點,讓您可以自訂標籤風格、...。
Concise Counter of Post Views 》總結:這個外掛會記錄每篇文章被訪問的次數,並在文章底部顯示。同時,在管理員面板的文章清單中也可以看到這個數值。, , 問題與答案:, 1. 這個 WordPress ...。
Single Post View Counter 》總結:, Single Post View Counter 是一個輕量級的WordPress外掛,可追蹤並顯示每篇文章的瀏覽次數。安裝方便,瀏覽次數會自動顯示在每篇文章的底部。, , 問題...。
TRT Post Views 》<html>, <ul>, <li>TRT Post Views 是一個輕巧且高效的外掛,可讓您追踪並顯示在您的 WordPress 網站上每篇文章的觀看次數。輕鬆監控文章...。
DanP Google Analytics Pageview Sync 》此外掛能將所有頁面和文章的 Google Analytics 頁面瀏覽次數匯出,並將數據複製到 WordPress 資料庫中。, 在 WordPress 管理畫面中,您可以看到每個頁面和文...。
