=== WP Statistics – Simple, privacy-friendly Google Analytics alternative ===
Contributors: veronalabs, mostafa.s1990, kashani, GregRoss
Donate link: https://wp-statistics.com/donate/
Tags: analytics, google analytics, insights, stats, site visitors
Requires at least: 6.6
Tested up to: 7.0
Stable tag: 14.16.10
Requires PHP: 7.4
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Get website traffic insights with GDPR/CCPA compliant, privacy-friendly analytics. Includes visitor data, stunning graphs, and no data sharing.

== Description ==
Discover GDPR-compliant analytics with [WP Statistics](https://wp-statistics.com/?utm_source=wporg&utm_medium=link&utm_campaign=website), the top choice for WordPress users seeking an alternative to Google Analytics. No external accounts, unlimited visitor tracking, and full data ownership—all stored directly in your WordPress database.

[Checkout Demo](https://wp-statistics.com/demo) | [View Screenshots](#screenshots)

= GDPR Compliant (Data Privacy) =
WP Statistics is GDPR, CCPA, PECR, and cookie compliance by default.

* We do not use cookies
* We do not store personally identifiable information (PII) by default
* 100% data ownership. Data is entirely created and stored on your server
* Enhance IP Hashing with Random Daily Salt Mechanism
* Features to export and delete data for GDPR
* Respect for User Privacy with Do Not Track (DNT)
* Privacy Audit Tool for compliance with privacy laws

Your site won't need to have a cookie popup since WP Statistics uses [cookie-less tracking](https://wp-statistics.com/resources/counting-unique-visitors-without-cookies/?utm_source=wporg&utm_medium=link&utm_campaign=doc).

You can find more information in "[What we collect](https://wp-statistics.com/resources/what-we-collect/?utm_source=wporg&utm_medium=link&utm_campaign=doc)".

= Top Features =
* Fully integrate with your WordPress and your content structure and you have the all reports all in your WP dashboard
* Content and Category Analytics: Track performance based on your site’s content and categories.
* Simple analytics dashboard
* Super easy to install. No coding or technical knowledge needed
* Advanced data privacy settings that are customizable to fit your needs, in compliance with diverse data protection laws
* Track URL parameters, including UTMs, for campaign analysis
* With configurable settings, manage large amounts of data on high-traffic websites
* Monitor live online user traffic in real-time
* Fully customized overview dashboard page
* Shows your most popular posts and pages
* Referrals Tracking: Track and analyze referrals with five reports: Referred Visitors, Referrers, Search Engines, Social Media, and Source Categories. The new Source Categories report includes support for Organic Search, Paid Search, Organic Social, Paid Social, and more.
* Lists your top referral sources such as search engines
* Author Analytics: Measures author performance.
* Geographic Reports: Location-based analytics, including countries, cities, European countries, US states, and regions within your country.
* Devices Report: Detailed device-specific analytics covering browsers, operating systems, device categories and device models.
* Bypass Ad Blockers: Dynamically load the tracking script with a unique name and address to bypass ad blockers.
* Integrate with WP Consent API: Ensures compatibility with consent plugins like Complianz and Cookiebot.
* Email reports with customizable content
* Customize role-based access to view analytics and modify settings.
* Advanced Filtering & Exceptions: By user roles, IPs, countries, URLs, and more.
* Premium Add-on: [Data Plus](https://wp-statistics.com/product/wp-statistics-data-plus?utm_source=wporg&utm_medium=link&utm_campaign=dp)
 * **Custom Post Type Tracking**: DataPlus extends WP Statistics' tracking to include all custom post types in addition to Posts and Pages.
 * **Custom Taxonomy Analytics**: In addition to monitoring default taxonomies like Categories and Tags, DataPlus also tracks custom taxonomies.
 * **Link Tracker**: Find out which outbound links your audience clicks on, giving you insights into their preferences and behaviors.
 * **Download Tracker**: Keep track of what's being downloaded, who's downloading it, and when.
 * **Individual Author Performance**: Detailed metrics on the performance of individual authors.
 * **Detailed Analytics for Each Country**: In-depth analytics for each country to enhance geographical reporting.
 * And more!
* Premium Add-on: [Marketing](https://wp-statistics.com/product/wp-statistics-marketing/?utm_source=wporg&utm_medium=link&utm_campaign=marketing)
 * **Campaign Analytics**: Track UTM-tagged links and see which campaigns drive the most visitors.
 * **Google Search Console Integration**: Monitor impressions, clicks, and queries.
 * **Custom Event Tracking**: Create goals based on clicks, pageviews, or events and monitor conversions.
 * **Built-in UTM Link Builder**: Generate and validate campaign URLs inside your dashboard.

**Get the most out of your website analytics by using WP Statistics Premium Add-ons**
Upgrade your analytics toolkit with our range of premium add-ons, including [Data Plus](https://wp-statistics.com/product/wp-statistics-data-plus?utm_source=wporg&utm_medium=link&utm_campaign=dp), [Advanced Reporting](https://wp-statistics.com/product/wp-statistics-advanced-reporting/?utm_source=wporg&utm_medium=link&utm_campaign=adv-report), [Real-Time Stats](https://wp-statistics.com/product/wp-statistics-realtime-stats/?utm_source=wporg&utm_medium=link&utm_campaign=realtime), [Mini Chart](https://wp-statistics.com/product/wp-statistics-mini-chart/?utm_source=wporg&utm_medium=link&utm_campaign=mini-chart), [Marketing](https://wp-statistics.com/product/wp-statistics-marketing/?utm_source=wporg&utm_medium=link&utm_campaign=marketing), and [more](https://wp-statistics.com/add-ons/?utm_source=wporg&utm_medium=link&utm_campaign=add-ons). Making informed decisions is easier with these powerful tools.

**Special Offer:** Save up to 60% on all premium features when you purchase [WP Statistics Premium](https://wp-statistics.com/pricing/?utm_source=wporg&utm_medium=link&utm_campaign=premium).

= Report Bugs =
Having trouble with a bug? Please [create an issue](https://github.com/wp-statistics/wp-statistics/issues/new) on GitHub. Kindly note that [GitHub](https://github.com/wp-statistics/wp-statistics) is exclusively for bug reports; other inquiries will be closed.

For security vulnerabilities, please report them through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/wordpress/plugin/wp-statistics/vdp). The Patchstack team will validate, triage, and handle any security issues.

== Installation ==
1. Upload `wp-statistics` to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Make sure the Date and Time are set correctly in WordPress.
4. Go to the plugin settings page and configure as required (note this will also include downloading the GeoIP database for the first time).

== Frequently Asked Questions ==
= Who should use WP Statistics? =
WP Statistics is designed for website owners, bloggers, marketers, and analysts who wish to track and understand the traffic on their WordPress site. It's user-friendly and powerful for professionals but also accessible for beginners.

= Is technical knowledge required to operate WP Statistics? =
No, WP Statistics focuses on simplicity. You don't need any coding skills to use it. Right from your WordPress dashboard, you can install and use the plugin.

= Will WP Statistics affect my site's performance? =
Your site's loading times will remain quick with WP Statistics. With our "Optimization" settings page, you can fine-tune how data is handled for high-traffic sites, providing you with the tools to optimize performance.

= Is it GDPR compliant? =
Yes, WP Statistics is GDPR compliant by default. You can find more information in "[What we collect](https://wp-statistics.com/resources/what-we-collect/?utm_source=wporg&utm_medium=link&utm_campaign=doc)".

= Are individual page analytics available? =
Every post, page, and custom post type is tracked in detail.

= Is it compatible with caching and CDN? =
WP Statistics is fully compatible with all caching plugins and CDNs.

= Are logged-in users tracked? =
By default, no. However, you can enable tracking logged-in users from the settings page.

= Can I use WP Statistics and Google Analytics at the same time? =
Yes, you can run them both at the same time without any problems.

= Are bot visits counted? =
We filter out bot visits using best practice techniques. Compared to Google Analytics, your views and visitors are very similar. The "[Enhancing Data Accuracy](https://wp-statistics.com/resources/enhancing-data-accuracy/?utm_source=wporg&utm_medium=link&utm_campaign=doc)" article can help you eliminate bots even further.

= Can I export data? =
Data can be exported to XML, CSV, or TSV files for backup or reporting purposes.

= Is there Multi-Site support? =
WP Statistics supports WordPress Multi-Site/Network installations. In the network admin, you can view combined or separate analytics for each subsite.

== Screenshots ==
1. Overview
2. Visitors Insights
3. Online Visitors Monitoring
4. Optimization
5. Settings
6. Real-Time Stats
7. Download Tracker
8. Understand Your Traffic Sources
9. Geographic
10. Author Analytics
11. Devices
12. Link Tracker
13. Privacy Audit
14. Content Analytics Dashboard
15. Category Analytics
16. Website Performance Report
17. Mini Chart Quick View
18. Page Insights
19. Detailed Visitor Report
20. Campaign Reports
21. Google Search Console Reports
22. Goal and Event Tracking

== Upgrade Notice ==
= 14.15 =
To ensure the plugin works correctly, please clear your cache because some request payloads have been updated. Also, review your settings, especially if you use DataPlus, Advanced Reporting, or Customization, as some options have changed.
Update add-ons DataPlus, Advanced Reporting, and Mini-Chart to the latest version.

== Changelog ==
= 14.16.10 - 2026-07-25 =
- **Fix:** Prevented a fatal error on the tracking request when the referrer parameter was sent as an array instead of a single value.
- **Enhancement:** General security hardening and internal improvements.

= 14.16.9 - 2026-07-21 =
- **Fix:** Content Analytics no longer adds the site-wide historical baseline into each post's Total Views, so per-post totals are accurate again (issue [#1097](https://github.com/wp-statistics/wp-statistics/issues/1097)).
- **Fix:** Prevented a fatal error on admin load when license validation fails or the license key is empty.
- **Enhancement:** Hardened input handling and output escaping across the visitor and referral reports.

= 14.16.8 - 2026-05-19 =
- **Enhancement:** Hardened input handling across admin AJAX endpoints, the dynamic query builder, the referrer pipeline, and the GeoIP download URL.
- **Enhancement:** Removed the bundled moment.min.js in favor of the copy shipped with WordPress core.
- **Enhancement:** Added direct-file-access guards, switched date() calls to gmdate(), and routed parse_url() through wp_parse_url().
- **Enhancement:** Normalized translator placeholders and text domains; routed translated UI strings through escape/kses functions.
- **Enhancement:** Replaced direct unlink() calls in plugin code with wp_delete_file().

= 14.16.7 - 2026-05-12 =
- **Enhancement:** Hardened escaping and sanitization in device reports.
- **Enhancement:** Tracking endpoints now send noindex and no-cache headers to prevent "ghost pages" in Google Search Console.
- **Fix:** Stopped GeoLite2-City background downloads on Cloudflare IP Geolocation sites (issue [#1093](https://github.com/wp-statistics/wp-statistics/issues/1093)).
- **Fix:** "Bypass Ad Blockers" no longer copies the tracker into uploads, improving compatibility with hardened hosting.
- **Fix:** **Run Migration** button stays clickable during an active migration to recover stuck queues.
- **Deprecated:** `wp_statistics_hashed_asset_root` and `wp_statistics_hashed_asset_dir` filters; will be removed in a future release.

= 14.16.6 - 2026-04-16 =
- **Fix:** Removed legacy TinyMCE integration that caused "Failed to load plugin" errors in the classic editor, especially with themes like Corvix and Avada.
- **Fix:** Excluded browser prefetch and prerender requests that were inflating visit counts.
- **Fix:** Excluded headless browsers and automation tools (Headless Chrome, PhantomJS, Puppeteer, Playwright, Selenium) that were being counted as real visitors.

= 14.16.5 - 2026-04-11 =
- **Enhancement:** Simplify WP Consent API consent level logic.
- **Enhancement:** Hardened plugin security and improvement
- **Enhancement:** Tested up to WordPress v7.0
- **Fix:** Fixed an issue where the download/link tracker did not respect user role exclusion settings (e.g., Administrator), causing admin downloads to be recorded despite being excluded.

= 14.16.4 - 2026-03-16 =
- **Fix:** Improved permission checks on AJAX handlers for better security.
- **Enhancement:** Updated Device Detector library (6.4.7 → 6.5.0) with latest browser, device, and bot detection rules.
- **Enhancement:** Updated MaxMind DB Reader (1.12.1 → 1.13.1) and GeoIP2 libraries.

= 14.16.3 - 2025-02-23 =
- **Fix:** Minor improvements and fix version.

= 14.16.1 - 2025-02-09 =
- **Fix:** Fixed an issue where historical data was not included in single-content/single-resource reports.
- **Fix:** Improved compatibility with Bedrock when WP Statistics is placed in mu-plugins by fixing asset hashing and obfuscated tracker path resolution.
- **Fix:** Fixed an issue where the Page ID was not correctly updated during Interactivity API navigation and barba.js transitions.
- **Fix:** Prevent infinite or extremely large percentage values when no previous analytics data exists.
- **Fix:** Fixed the "All Time" filter showing incorrect start date in single content analytics.
- **Fix:** Fixed notification indicators hiding when viewing the empty Dismissed tab.
- **Fix:** Optimized license API caching to prevent excessive requests on multilingual sites.
- **Fix:** Resolved unsafe SQL calls and direct file access issues for WordPress.org compliance.
- **New:** Added "Total" row to the Traffic Summary widget showing all-time Visitors and Views (includes legacy historical data).
- **Enhancement:** Added pagination support for Category Analytics.
- **Enhancement:** Unified disabled premium buttons across the plugin for a consistent look.
- **Enhancement:** Added PHP environment configuration values (memory_limit, max_execution_time, post_max_size, upload_max_filesize) to anonymous usage data.
- **Enhancement:** Updated Advanced Reporting premium modal copies.
- **Dev:** Added `wp_statistics_register_background_jobs` filter to allow add-ons to register custom background processes.
- **Dev:** Added `wp_statistics_register_data_migrations` filter to allow add-ons to register custom data migration keys.
- **Dev:** Added `wp_statistics_resolve_page_from_uri` filter to allow custom page resolution from URL for SPA tracking.

= 14.16 - 2025-12-01 =
- **New:** Added an **Export** button to all report pages (requires the Advanced Reporting add-on).
- **New:** Introduced a new `Summary Totals` table to store daily aggregated data, improving performance.
- **Enhancement:** Tested up to WordPress v6.9.
- **Enhancement:** Updated minimum PHP requirement to v7.4 and WordPress requirement to v6.6.
- **Enhancement:** Redesigned Summary widgets across all report pages for a cleaner and more consistent look.
- **Enhancement:** Optimized database queries and improved overall performance.
- **Enhancement:** Improved the online tracking system by removing heartbeat requests, reducing server load and improving performance.
- **Deprecation:** Removed the **Matomo Referrer Spam Blacklist** option from the settings.

For more information about the major update, please [visit our release post](https://wp-statistics.com/release/wp-statistics-v14-15/) or follow [@wp_statistics](https://twitter.com/wp_statistics) on Twitter

[See changelog for all versions](https://raw.githubusercontent.com/wp-statistics/wp-statistics/master/CHANGELOG.md).