=== Haychdev Heatmaps ===
Contributors: haychdev
Tags: heatmap, click-tracking, analytics, scroll-map, conversion
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Click and scroll heatmaps that live entirely in your own database. No cookies, no third-party trackers, no consent banner required.

== Description ==

Haychdev Heatmaps shows you where visitors click and how far they scroll — as a heat overlay on your live pages.

Unlike heavyweight heatmap services, it is built differently:

* **Your data stays yours.** Everything is stored in your own WordPress database. Nothing is sent to third-party servers.
* **Genuinely lightweight.** A <4KB cookieless tracker sends a single request per pageview.
* **Privacy-first by architecture.** No cookies, no IP storage, no fingerprinting, no PII. GDPR-friendly out of the box.
* **View heatmaps on your real pages.** Open any page with the floating toolbar and see clicks and scroll depth overlaid on the live, responsive layout.
* **Hover for exact numbers.** Move your cursor over any heated area to see the click count and its share of the page (or, in scroll mode, the percentage of visitors who reached that depth).

**Features (all free):**

* Click and scroll heatmaps on every page
* Device segmentation — filter heatmaps by desktop, tablet, or mobile independently
* CSV export — download raw click events for any page
* Live viewer overlay — see heatmaps rendered directly on your real pages
* 90-day data retention
* All data stored exclusively in your own WordPress database
* Sub-4KB cookieless tracker — no cookies, no PII, no consent banner needed

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/haychdev-heatmaps/`, or install through the WordPress plugins screen directly.
2. Activate the plugin through the Plugins screen.
3. Visit **Haychdev → Heatmaps** in wp-admin. Tracking starts automatically.
4. After some traffic arrives, click "View heatmap" next to any page.

== Frequently Asked Questions ==

= Does it slow down my site? =
The tracker is under 4KB, loads deferred, and sends one request per pageview. Heavy pages are automatically sampled.

= Where is my data stored? =
In three custom tables in your own WordPress database. Deleting the plugin removes them completely.

= Do I need a cookie consent banner? =
The plugin sets no cookies and stores no personal data. Consult your own counsel, but the architecture is consent-banner-friendly by design.

= How long is data kept? =
90 days by default, configurable with the `hd_heatmaps_retention_days` filter.

= Does the plugin contact any external server? =
No. The plugin makes no external requests of any kind — all tracking data stays exclusively in your own WordPress database.

= Are all features free? =
Yes. Click and scroll heatmaps, device segmentation (desktop/tablet/mobile), CSV export, and 90-day retention are all included and free.

== Privacy ==

The plugin does NOT send any data to external servers. The tracker collects only click coordinates, scroll depth, and a device-type flag (no IP addresses, no cookies, no fingerprinting). All data is stored exclusively in your own WordPress database.

== Screenshots ==

1. Click heatmap rendered as a live overlay on your real page, with the floating toolbar (clicks/scroll modes, date range, totals) and a hover tooltip showing the click count for the area under the cursor.
2. The admin screen: per-page traffic table, tracking settings, and one-click data reset.

== Changelog ==

= 0.5.0 =
* Added internal extension hooks for the optional Heatmaps Pro add-on. The free plugin captures no new data and remains fully functional and privacy-first.

= 0.4.1 =
* Security/hardening: every database query now runs through `$wpdb->prepare()`, using `%i` identifier placeholders for server-derived table names (WordPress.org review feedback).

= 0.4.0 =
* All features are free and fully functional — click & scroll heatmaps on every page, device segmentation (desktop/tablet/mobile), CSV export, 90-day retention.
* Internal rename and code-quality improvements.

= 0.3.0 =
* All features are now free and fully functional: click and scroll heatmaps on every page, desktop/tablet/mobile segmentation, 90-day retention, and CSV export.
* Removed the licensing system; the plugin makes no outbound requests.
* Added extension hooks for companion add-ons.

= 0.2.0 =
* Hover over any heated area to see its click count and share of the page (scroll depth percentage in scroll mode).

= 0.1.1 =
* Top-level admin menu instead of sitting under Settings.
* Page view/click counts in the admin table now appear immediately, including same-day traffic, instead of waiting for the nightly aggregation.

= 0.1.0 =
* Initial release: click/tap heatmaps, scroll-depth maps, device segmentation, privacy-first tracking.

== Upgrade Notice ==

= 0.4.0 =
All features are free and fully functional — click & scroll heatmaps, device segmentation, CSV export, and 90-day retention. No external requests of any kind.
