
內容簡介
CloudScale Site Analytics 解決了在快取的 WordPress 網站上追蹤頁面瀏覽量的基本問題。透過輕量級的 JavaScript 信標,該外掛能夠在快取頁面加載後準確記錄每次瀏覽,確保即使在使用 CDN 時也能獲得準確的流量數據。
【主要功能】
• 準確計算 Cloudflare 和其他 CDN 背後的流量
• 基於會話的去重,避免重整時重複計數
• IP 限制保護以防止流量膨脹攻擊
• Jetpack Stats 一鍵遷移工具
• 儀表板小工具顯示每小時、每日、每月和六個月的圖表
• 可配置的文章瀏覽計數徽章樣式
外掛標籤
開發者團隊
原文外掛簡介
CloudScale Site Analytics solves the fundamental problem with page view tracking on cached WordPress sites. When Cloudflare, Fastly, or any CDN serves a cached HTML page, WordPress never executes. Server side counters like Jetpack Stats miss the view entirely, resulting in severe undercounting, typically 5 to 10 times lower than actual traffic.
CloudScale uses a lightweight JavaScript beacon that fires after the cached page loads, recording every view through a REST API endpoint that bypasses the CDN cache. The result is accurate view counts regardless of cache status.
Key Features
Accurate counting behind Cloudflare and other CDNs
Session based deduplication (no double counting on refresh)
IP throttle protection against view inflation attacks
Jetpack Stats one click migration tool
Dashboard widget with hourly, daily, monthly, and 6 month charts
Top Posts and Recent Posts sidebar widgets with pagination
Configurable view counter badge on posts (badge, pill, or minimal style)
Five colour options for the view counter (blue, pink, red, purple, grey)
Admin column showing views on the Posts list
Full statistics page with period comparison and top posts
REST API endpoints for custom integrations
Privacy focused: IP addresses are hashed with wp_salt, never stored raw
How It Works
Cloudflare serves the cached HTML page at full speed
The browser loads the page and executes the beacon script
The beacon fires a lightweight POST to a WordPress REST endpoint
That endpoint bypasses CDN caching via headers and Cloudflare Cache Rules
WordPress records the view in the database and increments the counter
The page counter updates live without a reload
Requirements
WordPress 6.0 or higher
PHP 7.4 or higher
A Cloudflare account with Cache Rules (free tier is sufficient)
External services
This plugin optionally connects to the following external services:
Telegram Bot API (optional, alert notifications only)
When you configure Telegram alerts in the plugin settings, the plugin communicates with the Telegram Bot API:
* Service URL: https://api.telegram.org/
* What is sent and when: (1) When an admin clicks “Fetch Chat ID”, the plugin calls the getUpdates endpoint with your bot token to discover your chat ID. (2) When an admin clicks “Send Test” or when a plugin event triggers a notification, the plugin calls sendMessage to deliver the alert text to your configured chat ID. No visitor data, page view analytics, or site content is transmitted, only the admin-authored alert text and your Telegram bot credentials.
* This service is only used when an admin has entered a bot token and chat ID in the plugin settings.
* Telegram Privacy Policy: https://telegram.org/privacy
* Telegram Terms of Service: https://telegram.org/tos
DB-IP Lite (optional, geolocation only)
IP geolocation is optional. To enable it you click “Download DB-IP Lite” on the plugin’s statistics page, which fetches the free DB-IP City Lite database directly from DB-IP’s servers:
* Service URL: https://download.db-ip.com/
* The first download happens only when you explicitly trigger it from the admin panel. After that, while the auto-update option is enabled (it can be turned off on the statistics page), a daily WP-Cron event checks the calendar month and downloads a fresh database once per month to keep geolocation accurate. No automatic download ever occurs until you have performed the first download yourself.
* What is sent: only the standard HTTP GET request required to fetch the database file. No site, post, or visitor data is transmitted to DB-IP.
* DB-IP Privacy Policy: https://db-ip.com/privacy.php
* DB-IP Terms of Use: https://db-ip.com/tos.php
* The database file is stored locally in your site’s uploads directory after download.
OpenStreetMap (optional, geography map tiles only)
When the optional DB-IP geolocation feature is enabled and you view the Statistics page, the geography heat-map (powered by Leaflet.js) loads map tile images from OpenStreetMap:
* Service URL: https://tile.openstreetmap.org/
* When it fires: only when an admin user views the Geography section of the Statistics page and a DB-IP database has been downloaded. Never fires on the public-facing site.
* What is sent: standard tile requests (HTTP GET for map image tiles). The request URL includes zoom level and tile coordinates; no site data, post data, or visitor data is transmitted.
* OpenStreetMap Copyright and Licence: https://www.openstreetmap.org/copyright
* Tile Usage Policy: https://operations.osmfoundation.org/policies/tiles/
No visitor or site data is transmitted to any external service during page view tracking. The JavaScript beacon communicates only with your own site’s REST API endpoint, and view counts never leave your server.
Third-party libraries
The following open-source libraries are bundled with this plugin. The minified production builds are shipped; the full, unminified source for each is available at the linked upstream project, and each is under a GPL-compatible licence:
Chart.js 4.4.1, MIT License, https://github.com/chartjs/Chart.js/releases/tag/v4.4.1
Leaflet 1.9.4, BSD-2-Clause License, https://github.com/Leaflet/Leaflet/releases/tag/v1.9.4
MaxMind DB Reader (PHP), Apache License 2.0, https://github.com/maxmind/MaxMind-DB-Reader-php
License
This plugin is free software released under the GPLv2 or later license.
Copyright (C) 2026 CloudScale (https://cloudscale.consulting)
You may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to or software including (via compiler) GPL licensed code must also be made available under the GPL along with build and install instructions.
Full license text is included in LICENSE.txt and available at https://www.gnu.org/licenses/gpl-2.0.html
