=== CartLens for WooCommerce ===
Contributors: cartlens
Tags: woocommerce, conversion funnel, analytics, checkout, ecommerce
Requires at least: 6.5
Tested up to: 7.1
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Cookie-free, local conversion funnel analytics, product leak detector, and checkout error tracker for WooCommerce.

== Description ==

**CartLens for WooCommerce** shows you exactly where shoppers drop off between viewing a product and completing checkout—right inside your WordPress admin, with **zero cookies**, **zero external scripts**, and **zero Google Analytics 4 complexity**.

Most WooCommerce store owners lose 60–80% of ready-to-buy shoppers at the cart or checkout stage without ever knowing *which product* or *which checkout error* caused the leak.

= What You Get Free Forever =

* **4-Step Store Conversion Funnel:** Track Product Views, Add to Carts, Checkouts Started, and Completed Orders with step-by-step conversion rates and estimated checkout drop-off value.
* **Product Leak Detector:** Automatically ranks products with the highest unpurchased Add-to-Carts so you know which product pages need better pricing, clearer shipping, or stronger copy.
* **Checkout & Coupon Error Tracker:** Captures anonymized classic checkout validation errors, WooCommerce Block Checkout errors, and rejected coupon messages so you can fix silent conversion killers immediately.
* **100% Local & Cookie-Free (GDPR-Friendly):** No tracking cookies, no IP addresses stored, no personal data sent to third-party servers, and automatic PII redaction on checkout error logs.
* **Ultra-Lightweight (~1 KB Gzipped) & Cache-Compatible:** Loads a tiny `sendBeacon` script only on product and checkout pages. Works cleanly with Cloudflare, WP Rocket, LiteSpeed Cache, and server-side caching.
* **Zero Database Bloat:** Stores only daily aggregated counters in 3 compact tables, with built-in automatic retention cleanup via WP-Cron.
* **Modern WooCommerce Ready:** Fully compatible with High-Performance Order Storage (HPOS) and WooCommerce Cart & Checkout Blocks.
* **One-Click CSV Export:** Export daily funnel metrics for 7, 30, or 90 days anytime.

= Upgrade to CartLens Pro (Optional Add-On) =

Need automated monitoring as your store scales? **CartLens Pro** adds real-time Email/Slack checkout failure alerts, payment & shipping method drop-off attribution, cookie-free UTM campaign funnels, and weekly executive email digests.

== Installation ==

1. Upload the `cartlens-for-woocommerce` folder to `/wp-content/plugins/` or install directly through the WordPress Plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress (requires WooCommerce).
3. Navigate to **WooCommerce > CartLens Funnel** to view your live conversion funnel and configure retention settings.

== Frequently Asked Questions ==

= Does CartLens slow down my storefront? =
No. CartLens only loads a single ~1 KB gzipped (2.3 KB uncompressed) vanilla JavaScript file on single product pages and checkout pages using non-blocking `navigator.sendBeacon()`. It has zero external dependencies and zero third-party network calls.

= Do I need a cookie consent banner for CartLens? =
CartLens does not set tracking cookies, does not fingerprint browsers, does not store IP addresses, and does not send any visitor data to external servers. All metrics are aggregated daily counts stored inside your own WordPress database.

= Will this bloat my WordPress database? =
No. Unlike session-recording or raw event-logging plugins that insert millions of rows, CartLens aggregates counts by day. You can also configure automatic data pruning (default: 90 days) under **CartLens Funnel > Settings & Privacy**.

= Does it support WooCommerce HPOS and Block Checkout? =
Yes. CartLens declares explicit compatibility with High-Performance Order Storage (`custom_order_tables`) and monitors both Classic Checkout and WooCommerce Block Checkout.

== Screenshots ==

1. Store Conversion Funnel overview with KPI cards, step-by-step drop-off bars, and daily trend chart.
2. Product Leak Detector ranking high-interest products with low purchase conversion.
3. Anonymized Checkout & Coupon Friction log pinpointing silent checkout blockers.
4. Privacy, auto-pruning retention, and database footprint settings screen.

== Changelog ==

= 1.0.0 =
* Initial release.
* Added 4-step WooCommerce conversion funnel dashboard (7/30/90-day windows + CSV export).
* Added Product Leak Detector and anonymized Checkout & Coupon Error log.
* Added HPOS and Block Checkout compatibility plus automated daily retention cleanup.

== Upgrade Notice ==

= 1.0.0 =
Initial public release of CartLens for WooCommerce.
