| 开发者 | giokat |
|---|---|
| 更新时间 | 2026年11月16日 00:38 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
iguru-daily-privacy-stats folder to /wp-content/plugins/, or install the zip from Plugins > Add New > Upload Plugin.The plugin stores no cookies and no personal data, only daily totals per post, referrer and country. In most cases this needs no consent banner. Laws differ between countries, so describe your analytics in your privacy policy, and ask a lawyer if you are unsure.
Yes. Views are counted by a small script in the page, so they are counted even when the page comes from a cache or a CDN. The script is marked so that WP Rocket, FlyingPress and Cloudflare Rocket Loader do not delay it.
From a header that your CDN or server adds to each request, for example Cloudflare's CF-IPCountry. The plugin does not look up IP addresses. If your setup provides no country header, the Countries card stays empty and everything else works normally. Developers can supply the country with the dpstats_country filter.
For each day: the referring site (for example google.gr or forum.example.com), the post the visit started on, and, only for websites and public forums, the linking page without its query string (the part after "?"). Search engines, email, AI chats and apps do not provide a useful page, so only their name is kept. Nothing identifies a visitor. You can turn off recording of linking pages under Statistics > Data.
A view is counted each time a post is opened. A visit is counted for the first page of a visit that comes from outside your site (a search engine, social media, a direct link). Moving between your own pages adds views, not visits.
Each reader is represented by a one-way hash of the IP address and browser, made with a random secret that changes every day. The IP address is never stored, the hash cannot be turned back into it, and each hash is deleted after 10 minutes. "Online now" counts the readers seen in the last 5 minutes.
No. Logged-in users who can edit posts are not counted. Use the dpstats_skip_user filter to change this.
Very little: only daily totals are stored. Even a busy site with thousands of posts uses a few megabytes per year. The Data section of the Statistics page shows the current size, and lets you delete a single month.
By default your statistics are kept, so you do not lose them by accident. To remove everything, tick "Delete all statistics when the plugin is deleted" in Statistics > Data before deleting the plugin.
Yes. A theme that already counts views can declare add_theme_support( 'iguru-daily-privacy-stats' ) and call do_action( 'dpstats_record_view', $post_id, $referrer, $campaign ) for each counted view. $referrer is the page's document.referrer for the first view of a page load, and null for later ones. $campaign is optional: the landing page's utm_source, or utm_source/utm_campaign, for the Campaigns card. The plugin then adds no script.
No. The plugin's own counter reads utm_source and utm_campaign from the address of the page a visit starts on. Tag your links (for example ?utm_source=newsletter&utm_campaign=november) and they appear in the Campaigns card. If your theme counts views itself, it has to pass the campaign to the plugin (see the previous question).
dpstats_record_view (action): record a view from a theme or another plugindpstats_own_counter (filter): turn the built-in counter on or offdpstats_skip_user (filter): decide whether the current user is counteddpstats_is_bot (filter): adjust bot detectiondpstats_country (filter): supply the visitor's two-letter country codedpstats_visitor_ip (filter): supply the visitor's address used for the "Online now" hashdpstats_referrer_name (filter): change the display name of a referrerdpstats_keep_referrer_path (filter): decide whether the exact linking page of a source is recordeddpstats_daily_caps (filter): the most different referrers, pages, landing posts and campaigns recorded per daydpstats_alltime (filter): supply all-time totals for the "Most read" cardBoth. iGuRu Daily Privacy Stats runs entirely on your own server and needs no WordPress.com account, so it can replace Jetpack Stats, or run next to it while you compare. It does not import Jetpack's past statistics: counting starts when you activate it.
dpstats_record_view.