Linux 软件免费装

SQMViews

开发者 schqm
更新时间 2026年2月2日 03:31
PHP版本: 8.1 及以上
WordPress版本: 6.9
版权: GPLv3
版权网址: 版权信息

标签

privacy analytics metrics page views

下载

1.1.9

详情介绍:

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: Performance: Drop-in script Privacy & Control: Flexibility: What Gets Tracked? Content Types: Perfect For How It Works
  1. Lightweight JavaScript tracker injected on tracked pages (inline or external)
  2. Fast endpoint receives tracking data
  3. File-based storage for raw data writes data to JSONL files (no database overhead)
  4. Background processing via WP-Cron aggregates data hourly/daily and put them in the database
  5. Interactive dashboard displays charts and metrics
Extensibility 30+ Developer Hooks: WP-CLI Support ` Process statistics manually wp sqm-views process ` Multisite Compatible Planned Why Choose SQMViews? vs External Analytics: Requirements Credits SearchQueryMaster.com team Powered by:

安装:

Automatic Installation
  1. Log in to your WordPress admin panel
  2. Navigate to Plugins → Add New
  3. Search for "SQMViews"
  4. Click Install Now then Activate
  5. Go to SQMViews → Tracking Settings to configure
Manual Installation
  1. Download the plugin zip file
  2. Log in to your WordPress admin panel
  3. Navigate to Plugins → Add New → Upload Plugin
  4. Choose the zip file and click Install Now
  5. Click Activate Plugin
  6. Go to SQMViews → Tracking Settings to configure
First Steps After Installation
  1. Configure Tracking - Go to SQMViews → Tracking Settings
  2. Select which post types to track
  3. Choose taxonomy archives to monitor
  4. Select JavaScript loading method (inline/external)
  5. Set Processing Schedule - Go to SQMViews → Processing
  6. Choose cron interval (hourly recommended)
  7. Verify endpoint status (fast endpoint preferred)
  8. View Analytics (Once you have enough data) - Go to SQMViews → Statistics
  9. Explore interactive dashboard
  10. Filter by date range
  11. Compare different metrics
Performance Optimization For best performance on high-traffic sites:
  1. Enable Fast Endpoint (automatic on most hosts)
  2. Copy sqm-views-pages.php in WordPress root folder (next to wp-config.php)
  3. Bypasses WordPress load
  4. Reduces tracking overhead from ~250ms to ~5ms
  5. Check status in Processing Settings
  6. Use External JavaScript (recommended for caching)
  7. Set in Tracking Settings
  8. Allows browser caching
  9. Slightly faster page loads
  10. Adjust Cron Interval
  11. Hourly: Good for most sites
  12. 15 minutes: High-traffic sites needing real-time data
  13. 6 hours/Daily: Low-traffic sites saving resources

屏幕截图:

  • Tracking settings page for configuring which post types and taxonomies to track
  • Processing settings page showing cron status, scheduled runs, and manual processing options
  • Statistics overview displaying total records, recent activity, and active endpoint configuration

常见问题:

Does this plugin send data to external servers?

No! All data stays on your server. No data is sent to any third-party tracking services. You have complete control and ownership of your analytics data.

Will this slow down my website?

No! The plugin is optimized for performance:

  • Fast tracking endpoint bypasses WordPress load (~5ms response time).
  • Conventional API endpoint uses WordPress REST API (~250ms response time).
  • Asynchronous JavaScript doesn't block page rendering.
  • File-based storage during tracking (zero database write regarding of your traffic).
  • Background processing via WP-Cron through batch writes into a separate table (minimal impact on the database performance and visitors).
Most sites should see no noticeable performance impact.

Is it GDPR compliant?

The plugin is GDPR-friendly by default:

  • No personal data collected (IP present in the raw log files to prevent abuse and removed from aggregated data, no cookies)
  • No data sent to external services
  • All data stored on your server
  • You control data retention policies
However, you're responsible for:
  • Implementing proper consent mechanisms if required
  • Updating your privacy policy
  • Handling data subject access requests

Can I track custom post types?

Yes! Go to SQMViews → Tracking Settings and select any registered post types. The plugin automatically detects all public post types on your site, or use hook sqm_views_trackable_post_types

Does it work with caching plugins?

Yes! The JavaScript tracker should work seamlessly with most of the caching plugins and services including:

  • WP Super Cache
  • W3 Total Cache
  • WP Rocket
  • LiteSpeed Cache
  • Cloudflare
  • Cloudfront
The tracking code runs on the client-side, so cached pages are tracked properly.

Can I exclude certain users from tracking?

Yes! Use the sqm_views_should_track filter hook: add_filter( 'sqm_views_should_track', function( $should_track, $data ) { // Exclude logged-in administrators if ( current_user_can( 'manage_options' ) ) { return false; } return $should_track; }, 10, 2 ); And adjust your CDN and caching plugins to exclude logged-in users from caching.

How much disk space does it use?

Storage requirements depend on traffic (YMMV):

  • Low traffic (1,000 views/day): ~50 MB/month
  • Medium traffic (10,000 views/day): ~500 MB/month
  • High traffic (100,000 views/day): ~5 GB/month
  • TBD based on actual usage
Raw files are automatically archived into daily files and can be safely deleted after processing. We recommend storing archived files in a cold storage in case you want to replay the processing and aggregation, to remove bot traffic or extend data with more information.

Can I import/export the data?

Planned functionality.

What's the difference between "active time" and "time on page"?

  • Time on Page: Total time from page load to exit (includes idle time)
  • Active Time: Time when user is actively engaging (scrolling, clicking, typing), checked every 10s.
Active time gives you better insight into actual engagement vs. just having a tab open.

Can I track non-WordPress pages?

It is possible, see the setup used to track Home page and Search results.

Where is the data stored?

Analytics data is stored in two places:

  1. Raw files: wp-content/uploads/sqm-views/raw/*.jsonl (temporary)
  2. Database: Four WordPress database tables (sqm_views*)
Raw files are automatically processed and archived by WP-Cron.

How do I uninstall the plugin?

Deactivation keeps all data intact. Deletion removes all plugin files, database tables, and settings permanently. Make sure to export any data you want to keep before deleting.

更新日志:

See separate file CHANGELOG.md