=== Analytics Whatnot ===
Contributors: moonlithub
Tags: analytics, facebook, statistics, campaigns, privacy
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.22
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Understand website visits, optional Facebook Page insights, campaigns, conversions, and reports with consent-based analytics.

== Description ==

**Analytics Whatnot** is a WordPress analytics and reporting plugin from **NAJ Themes by Moonlit Hub**.

* **Website Analytics:** Track consented page views, estimated unique browsers, sessions, top pages, and referral sources.
* **Optional Facebook Insights:** Connect an authorized Facebook Page to view available post performance and sync historical data. Facebook is not required for website analytics.
* **Campaign Manager:** Organize Facebook posts into campaigns for reporting.
* **Conversion Tracking:** Manually record inquiries, confirmed bookings, and revenue.
* **Performance Reports:** Choose dates, review charts, and print or save reports as PDF using your browser.
* **Guided setup:** Getting Started, a saved installation checklist, searchable Help & FAQ, and Site Setup Summary.

**Privacy and consent:** Website tracking is **off by default**. If enabled, the built-in consent prompt lets visitors accept or decline optional analytics. A compatible external consent solution may be used instead, but the site administrator must verify that it controls tracking. The plugin stores hashed browser/session identifiers, page paths, and basic referral information; it does not intentionally store raw IP addresses in analytics event records. A short-lived hashed rate-limiting key may be generated to reduce abuse. Retention can be set to 30, 90, 180, or 365 days, or indefinite retention. Scheduled cleanup depends on WordPress cron. Administrators are responsible for an accurate privacy notice and applicable legal obligations.

**External service:** Facebook Insights connects to Meta's Facebook Graph API only when an administrator sets up the optional Facebook integration. Data is exchanged with Meta to authorize access and retrieve permitted Page insights. Meta's [terms](https://www.facebook.com/terms.php) and [privacy policy](https://www.facebook.com/privacy/policy/) apply. Some features require a Meta developer app, permissions, and possibly Meta App Review. No Facebook connection is needed to use website tracking or manual conversion reports.

== Installation ==

1. In your WordPress dashboard, go to Plugins > Add New Plugin > Upload Plugin and select the Analytics Whatnot ZIP.
2. Install and activate Analytics Whatnot.
3. Open Analytics Whatnot > Getting Started.
4. Review the site's privacy policy and visitor consent requirements before enabling Website Analytics.
5. Optionally connect an authorized Facebook Page through Facebook Insights; follow the built-in Installation Guide for Meta app setup.
6. Review your results in Performance Reports and check Site Setup Summary.

== Frequently Asked Questions ==

= Is Facebook required? =
No. Website Analytics, manual conversions, and Performance Reports work without Facebook.

= Does Analytics Whatnot track visitors automatically? =
No. Website tracking is off by default. When enabled, the built-in consent banner requests visitor permission before sending page-view events.

= What data does website analytics collect? =
Page-view time, page identifier/path, pseudonymous hashed browser and session identifiers, and basic referral/campaign fields. It does not intentionally store raw visitor IP addresses as analytics events. The anti-abuse system may use temporary hashed IP-derived rate-limit keys.

= Can I choose how long website analytics are retained? =
Yes. Select 30, 90, 180, or 365 days, or indefinite retention. Cleanup uses WordPress scheduled tasks and may run late on low-traffic sites.

= What happens when I deactivate the plugin? =
Scheduled syncing and cleanup hooks are stopped. Existing analytics records are not intentionally erased by deactivation. Back up the database before deleting or uninstalling the plugin.

= Why are Facebook statistics sometimes different from my selected dates? =
Some Facebook post totals are lifetime figures captured for posts published within your selected dates, not activity that occurred only within that period.

= Does this plugin guarantee privacy-law compliance? =
No. It provides consent-related controls and a suggested privacy policy section. Website administrators remain responsible for reviewing their own legal requirements.

== Screenshots ==

1. Getting Started helps website owners configure optional website analytics and Facebook insights.
2. Website Analytics shows consented page views, browser estimates, and traffic sources.

== Changelog ==

= 1.0.22 =
* Remove a production error_log call while retaining retention-cleanup failure handling.
* Remove development-only security review notes from the distribution ZIP.
* Align plugin and readme version metadata.

= 1.0.21 =
* Check manual metric saves, visitor retention cleanup results, and conversion deletion outcomes.


= 1.0.19 =
* Count successfully stored Facebook metrics only; report database write failures instead of silently treating them as saved.
* Prevent false success messages for failed conversion saves and deletes.
* No database-warning suppressions added; remaining direct-query warnings are retained for review.


= 1.0.16 =
* Maintenance build: report caching and invalidation adjustments.

= 1.0.0 =
* Initial public submission package: consent-based website analytics, optional Facebook Page Insights, campaigns, conversions, reporting, guided setup, and privacy policy guidance.

== Upgrade Notice ==

= 1.0.22 =
Production logging cleanup and distribution packaging.


= 1.0.16 =
Maintenance build for report caching.

= 1.0.0 =
Initial directory submission.
