HeatLens – Heatmap & Click Tracking Analytics

By hcandnmz

0+ active installationsVersion 1.0.1

Lightweight heatmaps and click tracking for WordPress. See clicks, rage clicks and scroll depth, and get data-driven UX suggestions.

Description

HeatLens Analytics is a free, self-hosted heatmap plugin for WordPress. It turns invisible visitor behavior into visual, actionable insights: see exactly where users click, tap, scroll, and hesitate — then get data-driven recommendations to improve conversions.

Unlike bloated SaaS analytics tools, HeatLens Analytics runs entirely on your WordPress server. No external tracking, no monthly fees, no data leaving your site.

🔥 Heatmap Visualization

See click density overlaid on your actual pages. Filter by device type (desktop, tablet, mobile), date range, and event type. Compare two time periods side by side with the built-in comparison mode.

🖱️ Complete Click & Touch Tracking

  • Precise X/Y coordinates with element identification (tag, ID, class, text)
  • Separate desktop mouse clicks and mobile/tablet touch events
  • Screen resolution and viewport tracking
  • Automatic device type detection

⚡ Rage Click & Dead Click Detection

Automatically identifies two critical UX problems:

  • Rage Clicks — 3+ clicks within 2 seconds in a 50×50px area means frustration
  • Dead Clicks — Clicks on non-interactive elements that produce no response

These are the areas losing you conversions right now.

📊 Scroll Depth Analytics

Uses IntersectionObserver API to accurately track how far visitors scroll (25%, 50%, 75%, 100%). Know if your most important content is actually being seen.

💡 Smart Suggestions Engine

5 analysis algorithms run automatically every 6 hours:

  1. Heat Density Grid — Finds click hotspots and suggests CTA placement
  2. CTA Performance — Identifies underperforming call-to-action buttons
  3. Scroll Depth Analysis — Detects important content buried below the fold
  4. Rage/Dead Click Areas — Flags frustration zones for immediate fixing
  5. WooCommerce Conversion — Tracks add-to-cart click-through rates

Each suggestion includes a confidence score so you can prioritize.

🛒 WooCommerce Integration

When WooCommerce is active, HeatLens Analytics provides additional analytics:

  • Add-to-cart button click tracking
  • Checkout flow button analytics
  • Wishlist interaction tracking
  • Conversion rate calculations per page

📤 Export Reports

  • CSV — Works everywhere
  • XLSX — Real Excel files with a styled header row, frozen header and auto-filter. Built in, no extra libraries needed
  • PDF — Optional, for developers: available when the TCPDF library is installed via Composer

🛡️ Privacy First — Built for GDPR & KVKK

  • No IP addresses stored — ever
  • No cookies — anonymous localStorage session IDs
  • Consent integration — optional GDPR mode loads the tracker only after consent (Complianz, CookieYes, GDPR Cookie Consent)
  • No form values — text typed into inputs is never recorded; only the visible label of clicked buttons, links and headings is stored
  • WordPress Privacy Tools — data export and erasure support
  • Ready-made privacy policy text — auto-appends to your privacy page

🚀 Performance

  • Vanilla JavaScript, zero dependencies, under 8KB gzipped
  • Async/defer script loading — zero render blocking
  • Batch event sending (5s intervals or 20 events) with Beacon API
  • Built-in bot filtering (Googlebot, Bingbot, etc.) and rate limiting (60 requests per minute per IP)
  • Throttled to max 10 events per second

Installation

  1. Upload the heatlens-analytics folder to /wp-content/plugins/
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. You’ll be redirected to the Welcome page, where you can generate demo data with one click to explore the features
  4. Go to HeatLens Analytics → Settings to configure tracking options
  5. (Optional, developers) For PDF export, run composer install --no-dev in the plugin directory

Minimum Requirements

  • WordPress 5.8 or higher
  • PHP 7.4 or higher
  • MySQL 5.6 or MariaDB 10.0

FAQ

Does this plugin slow down my website?

The tracking script is under 8KB gzipped, loads asynchronously in the footer, and sends events in batches to minimize network requests, so the impact on page load speed is minimal.

Is this GDPR / KVKK compliant?

HeatLens Analytics is designed to help you comply: it never stores IP addresses, uses anonymous session IDs (localStorage, not cookies), keeps all data on your own server, and has an optional GDPR mode that only loads the tracker after consent from plugins like Complianz and CookieYes. It also supports WordPress Privacy Tools. Whether your site as a whole is compliant depends on your own setup and local law, so enable GDPR mode if consent is required in your jurisdiction.

How long until I get suggestions?

By default, the analysis engine waits for at least 100 unique sessions over 48 hours before generating suggestions. These thresholds are configurable in Settings → Analysis.

Does it work with WooCommerce?

Yes. When WooCommerce is active, HeatLens Analytics automatically tracks add-to-cart buttons, checkout flow, and wishlist interactions. It calculates conversion rates per page and shows WooCommerce-specific analytics in the dashboard.

Can I track only specific pages?

Yes. Go to Settings → General and set URL patterns. Use * for all pages, or enter specific paths like /pricing/* or /products/* — one pattern per line. Wildcards are supported.

Does it work with page builders like Elementor?

Yes. HeatLens Analytics uses event delegation at the document level, so it captures clicks on any element regardless of how the page was built.

How do I export my data?

Go to the Page Analysis page, apply your filters (page, date range, device type), then click the CSV or XLSX export button. PDF export appears when the optional TCPDF library is installed.

Is this an alternative to Hotjar or Microsoft Clarity?

It covers the core of what those services are used for — click heatmaps, scroll depth, rage click and dead click detection — but runs entirely inside your WordPress site. Nothing is sent to an external service, there are no page-view limits and no account is needed. It does not include session recordings.

Where is the data stored?

In three custom tables in your own WordPress database. Data older than the retention period you choose (90 days by default) is deleted automatically, and everything is removed when you uninstall the plugin.

Is it compatible with caching plugins?

Yes. The tracker script uses the WordPress REST API, which is not affected by page caching. The script itself can be cached normally as it receives its configuration via wp_localize_script.

Screenshots

Changelog

1.0.1

  • New: built-in XLSX export — no external libraries needed
  • New: heatmap preview now shows the full page, so clicks below the fold are drawn in the right place
  • Fix: the suggestion engine could never find eligible pages
  • Fix: WooCommerce add-to-cart analysis query
  • Fix: rage clicks were missed after a click elsewhere; taps on mobile were counted twice
  • Fix: tracking now stops immediately when a visitor withdraws consent
  • Fix: one problem area produced several near-identical suggestions; dismissed suggestions no longer come back
  • Fix: events were not sent while the page was in the background
  • Fix: rate limit counted each request twice
  • Security: exports are downloaded through an authenticated link and deleted afterwards; spreadsheet formulas in exported data are neutralised
  • Security: the events endpoint respects the tracking setting, validates input types and no longer trusts client-supplied IP headers
  • Change: demo data is only generated on request and can be removed without touching real data
  • Change: form values and the text of large page sections are no longer recorded
  • Removed two settings that had no effect (Elementor / Gutenberg names)

1.0.0

  • Initial release
  • Click and touch tracking with event delegation
  • Canvas-based heatmap visualization with density threshold control
  • Smart suggestion engine with 5 analysis algorithms
  • Scroll depth tracking with IntersectionObserver
  • Rage click and dead click detection (MutationObserver)
  • Hover duration tracking (300ms+ threshold)
  • WooCommerce integration (add-to-cart, checkout, wishlist)
  • CSV, XLSX, and PDF (TCPDF) export
  • Privacy features for GDPR/KVKK (no IP, no cookies, consent plugins, Privacy Tools)
  • Admin dashboard with Chart.js graphs and weekly summary notices
  • Comparison mode for side-by-side period analysis
  • Cron-based automatic analysis (every 6 hours) and data cleanup
  • Bot filtering and rate limiting (60 req/min)
  • Welcome page with demo data generator