=== 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: 5.0
Tested up to: 6.8
Stable tag: 14.15.5
Requires PHP: 7.2
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.15.5 - 2025-09-21 =
- **Enhancement:** Added date range validation on report pages.
- **Enhancement:** Improved compare style and number formatting in "At a Glance" widgets.
- **Enhancement:** Updated chart component to show a message when no data is available.
- **Enhancement:** Limited queue and AJAX migrations (and their notices) to the "Minimum Role to Manage Settings."
- **Enhancement:** Refactored the migration codebase for better structure, readability, and maintainability.
- **Enhancement:** Added a "Recheck Schema" button on the optimization page to recheck database health via AJAX.
- **Fix:** Fixed console warnings on Chromium-based browsers on the settings page.
- **Fix:** Fixed incorrect "Queue Migration" completion notice after plugin updates.
- **Fix:** Resolved activation issues on fresh installs.
- **Dev:** Removed the `wp_statistics_data_export_base_query` and `wp_statistics_data_export_query` filters.

= 14.15.4 - 2025-09-02 =
- **Enhancement:** Refactored the update process and database schema updates to run on the frontend.
- **Enhancement:** Optimized the database manager to avoid duplicate queries.
- **Enhancement:** Improved Visitor Info display logic.
- **Enhancement:** Refactored install/uninstall code into separate classes for activation, load, and uninstall.
- **Enhancement:** Optimized schema health checks to run daily on the dashboard and after activation or updates.
- **Enhancement:** Improved responsiveness by converting "Optimize Page" actions in the Plugin Maintenance tab into asynchronous AJAX requests.
- **Fix:** Prevented `wp_statistics_tracker_js_errors` option bloat by limiting stored errors and truncating error messages.
- **Fix:** Fixed sorting issue in the `Top Pages` widget on the Page Insights report.
- **Fix:** Fixed Region widget issue when a country is not detected on the Geographic page.
- **Fix:** Prevented false "Queue Migration" notices after updates.
- **Fix:** Corrected the Filter Modal Reset button redirect.
- **Fix:** Fixed Visitor Journey not recording repeat visits to the same page.

= 14.15.3 - 2025-08-18 =
- **Fix:** Fixed a warning by validating geographic location codes are strings or integers before use.
- **Fix:** Correct redirect URL after clicking 'Start Migration'.
- **Fix:** Fixed Author Analytics filter issue.
- **Enhancement:** Added LiteSpeed Cache detection for improved cache-related warning notifications.
- **Enhancement:** Randomized the execution time of the GeoIP update event to reduce simultaneous load on jsdelivr.
- **Enhancement:** Improve performance of visitor migration.

= 14.15.2 - 2025-08-10 =
- **New:** Added compatibility with the `Borlabs Cookie` plugin.
- **New:** License keys can now be set via `wp-config.php` using constants like `WP_STATISTICS_LICENSE` and are automatically validated on init.
- **Enhancement:** Visitor data now stores only the major browser version to improve performance and reduce query load.
- **Enhancement:** Refactored advanced reporting to reduce redundant queries and improve performance.
- **Enhancement:** Replaced the legacy Robot List with the Device-Detector `isBot` check and renamed the bot detection field.
- **Fix:** Fixed filter issues on the Visitors and Referred Visitors pages.
- **Fix:** Adjusted access control for specific plugin actions.
- **Fix:** Fixed display issues on the single-visitor page when `user_id` is missing.
- **Fix:** Updated the Top Countries widget to calculate percentages based on all visitors.

= 14.15.1 - 2025-07-29 =
- **Enhancement:** Numbers in Overview widgets are now abbreviated (e.g., 10k), with full values shown on hover.
- **Enhancement:** Made integration JS files dependencies of `tracker.js` to avoid cache-related issues.
- **Enhancement:** Display a notice when a caching plugin is active.
- **Fix:** Fixed an issue with transient cache duration settings.
- **Fix:** Corrected color display for period-over-period comparison metrics.

= 14.15 - 2025-07-22 =
- **New:** Added an `Overview` report for Visitor Insight.
- **New:** Added an `Overview` report for Page Insights.
- **New:** Added a `Device Overview` report.
- **Enhancement:** Improved migration performance by running schema updates synchronously and removing background processes.
- **Enhancement:** Improved the `Views` report under Visitor Insight.
- **Enhancement:** Unset the `Consent Integration` setting when integration is deactivated.
- **Enhancement:** Added country name to flag tooltip in Visitor Info.
- **Enhancement:** Added unread notification badge to the Help Center menu.
- **Enhancement:** Merged notification and campaign cron jobs into a single daily schedule.
- **Enhancement:** Dashboard now shows only the "Traffic Overview" widget by default for a cleaner start.
- **Enhancement:** Optimized `getTrafficOverviewData` for fewer queries and faster widget loading.
- **Enhancement:** Skipped GeoIP database download in local environments to speed up setup.
- **Enhancement:** Removed unused `comments` join from Page Insights query to improve performance.
- **Enhancement:** Improved "Back" button functionality across pages to return to the previous view accurately.
- **Enhancement:** Improved warning message for missing consent-management plugin.
- **Fix:** Fixed report URL issues for custom post types.
- **Fix:** Resolved zero page view issues for non-'category' taxonomy filters.
- **Fix:** Fixed incorrect tracking of WooCommerce My Account sub-pages.
- **Fix:** Prevented `number_format()` warning when value is null in PHP 8.4.5.

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).