| 开发者 | freakstar |
|---|---|
| 更新时间 | 2026年7月17日 14:23 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
Turf sets no cookies and sends no data to any external service. Deduplication uses a one-way hash of IP + user-agent; the raw IP is never stored. It is designed to fit a "legitimate interest" basis for first-party, aggregate analytics - but that is not legal advice: check with whoever maintains your privacy policy.
Per page view Turf stores, in your own database only: a one-way visitor hash, timestamp, the page viewed, device type / browser / OS family (parsed from the user-agent), language, country code (only if Cloudflare provides it), referrer hostname, UTM parameters, scroll depth, and reading time. Raw event rows are pruned automatically after 18 months (filterable); aggregate totals are kept. Nothing is ever transmitted off your server.
"Views" is deduplicated: a repeat view of the same page by the same visitor within 30 minutes doesn't count again (the same default Google Analytics and Matomo use). The separate "Raw views" number counts every page load, for an apples-to-apples comparison with hit-counting tools.
Yes. Tracking runs client-side, so cached pages are still counted. Turf even reports how much of your traffic is served from cache.
From Cloudflare's CF-IPCountry request header, if your site is behind Cloudflare. Turf deliberately does not call any geolocation API - that would mean sending visitor IPs to a third party. Without Cloudflare, country stays empty unless you hook up your own local database via the turf_visitor_country filter.
By default, no - analytics history is precious, so the data survives an
uninstall/reinstall. To remove everything on uninstall, add
define( 'TURF_REMOVE_DATA_ON_UNINSTALL', true ); to wp-config.php (or set
the turf_remove_data_on_uninstall option to 1) before deleting the plugin.
On the plugin's GitHub repository: https://github.com/fbloemhof/turf-stats/issues
[turf_stats] shortcode: an at-a-glance table (online now, today,
yesterday, last 7 days, last 28 days) for a sidebar Text/HTML widget or
Shortcode block, with metric (views/visitors), layout (table/list)
and items attributes to customize which rows show.turf_connector_app_route_patterns /
turf_connector_app_label filters) - no behavior change unless you were
using the old turf_dorpsapp_route_patterns filter, which is renamed.wp turf-stats import-legacy-views WP-CLI command - same import,
run in small AJAX batches with a progress bar instead of the command line.