== Opti-Behavior — Full Changelog ==

The canonical, always up-to-date changelog is published at https://optiuser.com/opti-behavior/changelog/

= 1.9.0 - 2026-09-07 =
* **Feature:** Smart Insights v2 — insights are ranked by measured cost (the visitors and conversions actually lost, blended with severity and confidence) and labelled Critical/High/Medium/Low by rank inside the batch, so a busy site gets a short ordered shortlist instead of dozens of "high priority" items. Thinly observed signals are flagged as observations to confirm instead of being promoted.
* **Feature:** Business impact in money — when a value per conversion is known, cards and the detail modal show the exposure ("≈ $1,240 at risk this period") with the drop-off count, conversion rate and order value behind it. A new "Value of one conversion" setting covers sites without readable WooCommerce order history; WooCommerce data takes precedence.
* **Feature:** "Where is the problem?" — every insight now names the audience carrying it. The segment split is computed on the real behaviour tables across 8 dimensions (device, browser, country, traffic source, campaign, new vs returning, time of day, day type) with a significance test, comparison bars you can click to re-scope the evidence, and a daily chart of the metric with the previous period behind it and a "first detected" marker.
* **Feature:** Outcome verification — resolving an insight freezes its "before" measurement and a daily job re-measures the same signal over the two weeks that follow. Resolved cards carry a "Fixed <date> — <metric> <before> → <after>" chip, the weekly brief gained a "Wins this month" block, and the CSV export gained `outcome_verdict` and `outcome_change` columns. Too little post-fix traffic stores an honest `inconclusive` verdict instead of a win.
* **Feature:** Automatic funnel creation — Opti-Behavior detects what kind of site you run (WooCommerce, Easy Digital Downloads, blog/content, lead generation, signup, membership, LMS, booking) and suggests ready-made funnels on the Funnels page, with one-click creation, a "Set up recommended funnels" bulk action, and a "Customize" path that opens the normal builder pre-filled.
* **Feature:** Suggested funnel steps resolve their URLs through each source plugin's own API, so localized slugs (`/panier/`, `/commander/`, `/kasse/`) are used as-is. Funnels record where they came from (`source` / `recipe_id`) so re-scanning never creates duplicates, and a "Re-scan site" button plus a per-card Dismiss keep the list under your control. New `opti_behavior_funnel_site_context`, `opti_behavior_funnel_recipes` and `opti_behavior_funnel_recipe_steps` filters and an `opti_behavior_funnel_created` action for developers.
* **Feature:** With Opti-Behavior Pro, a funnel created from a suggestion is backfilled from your existing session history so it opens with real numbers, alongside Pro-tier recipes, data-driven "discovered" funnels and a weekly automatic re-scan.
* **Changed:** The insight detail modal is readable again — it lists only the reports you can actually open (the rest collapse behind one line), caps recommended actions at three and reconciles their wording against those reports, shows the measured probe-ranked causes with their values, and drops the empty placeholder sections. Traffic-source insights of the same signal collapse into a single list card, and the weekly CRO summary opens with the three costliest issues instead of a count.
* **Changed:** Smart Insights opens on Last 3 Months by default (new period option), and the Suggested Funnels panel collapses to a one-line summary ("2 new · 8 created") once you have funnels.
* **Changed:** Scheduled cleanup no longer stalls on spam-heavy sites. Spam, bot and automated sessions are an exempt class the daily tier purges unconditionally within its per-run cap, the mass-delete safety limit is measured on the non-spam rules against the non-spam session count only, and a tripped limit produces a logged partial run instead of cancelling the whole run. New `opti_behavior_cleanup_spam_bypasses_safety_limit` escape hatch, and Cleanup History collapses repeated identical entries.
* **Changed:** Scheduled cleanup "Maximum sessions per run" default raised from 5000 to 50000 — installs still on the old default are migrated once, custom values are preserved.
* **Changed:** All funnel and user-journey admin messages are translatable; all 5 locale catalogs were refreshed.
* **Fix:** Report links now arrive already filtered. Opening a report from an insight used to land on an unfiltered view: the Analytics dashboard applies the incoming device, browser, country, OS, traffic source, campaign, medium, channel, visitor-type and entry/exit-page parameters to its first data request, funnel links open the funnel they name on the window the insight was measured on, internal segment keys are decoded to the values the reports really filter on, and device values match regardless of case.
* **Fix:** Concurrent first-visit tracking requests could return HTTP 500 through a visitor/session insert race.
* **Fix:** Previous-period trends were empty on every insight — the previous window inherited the current window's minimum-sessions filter, device insights were never given a previous period, and Pro-produced error, form and segment insights were skipped entirely.
* **Fix:** Funnel insights offered no session recordings and site-wide error or friction insights were collapsed as "not applicable"; both now open the exact scope they were measured on.
* **Fix:** "Direct" was missing from the Form Analytics referrer filter options.
* **Fix:** Heatmap detail applies a desktop viewport floor, so a narrow reference width no longer selects a mobile or tablet breakpoint.
* **Fix:** "Could not load funnel suggestions" on busy, memory-constrained hosts — funnel requests now raise the admin memory limit like the rest of the admin, and the suggestions panel retries its first load once.

Development-cycle detail — every change below shipped as part of 1.9.0:

**Smart Insights v2**

Every insight now answers three questions: what it costs, which audience carries it, and whether the fix worked.

**Priority ranked by measured cost**

* Changed: Smart Insights priority is now ranked by measured cost instead of an absolute score. The score blends the absolute impact (visitors/conversions actually lost) with the previous traffic/severity/opportunity score and the confidence score, and the Critical/High/Medium/Low label is assigned by rank inside the batch (Critical = the worst few items, never more than 3) instead of by fixed thresholds. On a busy site this replaces "46 high-priority issues" with a short, ordered shortlist.
* Added: observation gate. An insight backed by fewer than 5 lost visitors or fewer than 30 observed sessions/form starts/funnel entries can no longer be labelled High or Critical and is flagged as an observation to confirm.
* Changed: "high priority" counts in the weekly brief, the headline and the insight-list counters now follow the label instead of a >= 60 score; insights stored before this release keep the old threshold rule.
* Changed: repeat-observation noise suppression now decides on the final, impact-aware score (previously it ran before impact was known, on the saturated score).
* Fixed: the recurring-issue priority boost no longer relabels a rank-scored insight with the old absolute thresholds.
* Added: `opti_behavior_smart_insights_priority_method` filter — return 'legacy' to restore the previous absolute-threshold scoring exactly.

**Impact in money**

* Added: business impact is now expressed in money when a value per conversion is known — card headline and detail modal show "≈ $1,240 at risk this period" with the drop-off count, the conversion rate applied and the average order value behind it.
* Added: new "Value of one conversion" setting (amount + currency code) lets sites without readable WooCommerce order history size leaks in money. Available on Free and Pro; WooCommerce data takes precedence.
* Changed: the "Biggest impact" sort now ranks by measured revenue first and falls back to visitors lost.
* Changed: insights measured on too little traffic no longer print a loss figure — they show a neutral observation notice with the sample size.

**"Where is the problem?"**

* Changed: rewrote the segment matrix on the real behaviour tables (pageviews/sessions/visitors) instead of the session-recordings table, so the split now works on every site, with or without recordings. It reports the insight's own metric per segment against everyone else — plus a significance test — instead of a share of sessions.
* Added: 8 segment dimensions — device, browser, country, traffic source, campaign, new vs returning, time of day and day type.
* Changed: segments below 30 sessions, below 10% of the page, or without a statistically significant gap are no longer reported as outliers.
* Changed: funnel and form insights now say the split needs page-level context instead of returning an empty panel.
* Added: new AJAX endpoint returning the daily curve of an insight's metric with the previous period, the first-detected date and an optional segment restriction.
* Added: segment splits and daily curves are cached for 6 hours and refreshed by "Refresh insights".
* Fixed: previous-period trends were empty on every insight — the previous window inherited the current window's minimum-sessions filter, device insights were never given a previous period at all, and error/form/segment insights produced by Pro were skipped entirely.
* Changed: the detail modal's three mostly-empty sections (Trend comparison, Who is affected?, Segment breakdown) are replaced by one "Where is the problem?" section: a one-sentence verdict naming the audience that carries the issue, up to three segment-vs-everyone-else comparison bars, and a daily chart of the key metric with the previous period behind it and a "first detected" marker. Inline SVG only, no chart library.
* Added: clicking a segment bar overlays that segment on the daily chart and re-scopes the evidence links and shortcuts to it.
* Changed: segment-scoped shortcuts are only offered when the destination report's URL actually carries the filter; duplicate destinations are collapsed.
* Changed: segments that perform better than everyone else are reported with neutral wording instead of problem wording.

**A modal you can actually read**

* Changed: decluttered the insight detail modal. Related reports now show only the reports you can actually open; the ones that do not apply are grouped behind a single collapsed line. Recommended actions are capped at three. Likely causes show the measured, probe-ranked causes with their values when available, and fall back to a collapsed generic list otherwise. Removed the placeholder paragraphs under "Evidence and proof" and the empty "-" lists.
* Changed: A/B test duration now prints the real estimate (for example "~90 days at current traffic") instead of "More than 56 days".

**List and weekly brief**

* Changed: traffic-source insights of the same signal are now collapsed into one list card that lists each source with its sessions and conversion rate; every source still opens its own diagnosis and stays reachable through deep links.
* Changed: the Weekly CRO Summary now opens with the three costliest issues — each with its money or visitor exposure and whether it is new, worse, better, unchanged or resolved compared with the previous stored run — instead of a count of high-priority issues.
* Changed: briefing cards with nothing to report ("Trend watch", "Recurring patterns") are hidden instead of rendering a "No notable items" placeholder.

**Proof that the fix worked**

* Added: resolving a Smart Insight freezes its "before" measurement, and a daily job re-measures the same signal on the same page over the two weeks that followed, storing before/after values, the change, and a verdict.
* Added: resolved cards carry a "Fixed <date> — <metric> <before> → <after>" chip; the weekly CRO brief gained a "Wins this month" block listing measured improvements.
* Added: the Weekly CRO Summary CSV export gained `outcome_verdict` and `outcome_change` columns.
* Changed: verdicts are honest — under 30 post-fix sessions, a vanished entity, or a signal that can no longer be evaluated store `inconclusive` with a reason instead of a win.
* Changed: rates are tested with a two-proportion z test; average metrics (scroll depth, time on page) with a Welch t test on stored dispersion; legacy rows and non-page entities fall back to the ±10% relative rule, marked `relative_only`.

**Report links that arrive already filtered**

* Fixed: opening a report from a Smart Insight ("Open report", "Analytics (Mobile)", a segment shortcut) landed on the destination with its Filters panel still on "All …" and the numbers unfiltered — the link promised a scoped view and delivered a site-wide one. The Analytics dashboard now reads the incoming device, browser, country, OS, traffic source, campaign, medium, channel, visitor-type, entry- and exit-page parameters, applies them to the very first data request, shows them in the Filters panel with the active-filter badge, and names them in the Smart Insights context chip.
* Fixed: the funnel link opened the Funnels index instead of the funnel it named, and the single-funnel view overwrote the insight's date window with its own 30-day default. The link now opens the funnel it points at, on the window the insight was measured on, with the incoming segment applied to its Filters panel.
* Fixed: traffic-source and campaign links carried the internal segment key ("utm:adnetwork/cpc", "campaign:spring-sale|google|cpc"), which is not a stored value, so the destination filtered on nothing. Links now also carry the decoded traffic source, medium, referrer host, channel and campaign name that the reports actually filter on.
* Fixed: a device link built from a segment carried the stored capitalisation ("Mobile") while the funnel and heatmap controls use lower-case keys, so the filter was silently dropped. Incoming values are now matched regardless of case.
* Changed: on the Analytics dashboard the early KPI prefetch is skipped when the URL already carries a filter, so a scoped link no longer fires one throw-away unfiltered query before the filtered one. Unparameterized page loads are unchanged.

**Actions that name only the reports you can open**

* Fixed: an insight could recommend "Review checkout errors, form friction, and recordings together." while the same modal collapsed Errors, Form analytics and Recordings under "6 other reports do not apply to this insight" — the diagnosis told you to open reports it had just declared irrelevant. Every recommended action and the "Next action" line are now reconciled against the reports the modal really offers: when only some of the named reports can be opened, the line is rebuilt naming that subset; when none can, the line is dropped. Advice about the page itself ("check JavaScript errors and broken buttons", "reduce checkout fields") is untouched — only wording that promises a report is reconciled.
* Fixed: funnel insights offered no session recordings at all. The recordings list can already filter on a funnel cohort, so a funnel insight now links to the recordings of the visitors who entered the funnel and never completed it — the exact population its drop-off was measured on — whenever such recordings exist.
* Fixed: a site-wide error or friction insight marked the Errors report as not applicable because the link carried no page or error-type filter. Its scope *is* the whole site, so the unfiltered report is the correct destination and the card now opens instead of being collapsed away.

**For developers**

* Added filters: `opti_behavior_smart_insights_priority_method`, `opti_behavior_smart_insights_segment_primary_metric`, `opti_behavior_smart_insights_segment_metric_map`, `opti_behavior_smart_insights_timeseries`, `opti_behavior_smart_insights_max_recommended_actions`, `opti_behavior_smart_insights_pro_upsell_actions`, `opti_behavior_smart_insights_outcome_metric`, `opti_behavior_smart_insights_outcome_generator`, `opti_behavior_smart_insights_outcome_batch_limit`, `opti_behavior_smart_insights_weekly_wins`, `opti_behavior_smart_insights_report_reference_tokens`, `opti_behavior_smart_insights_report_display_names`.
* Added options: `opti_behavior_smart_insights_conversion_value`, `opti_behavior_smart_insights_segment_cache_salt`.
* Added AJAX action `optibehavior_smart_insights_timeseries`; the `optibehavior_smart_insights_segments` payload is now a superset of the previous shape.
* Added daily cron hook `opti_behavior_smart_insights_outcome_check`.
* Database: `{prefix}optibehavior_insights.outcome_json longtext NULL`, added through the existing self-healing ADD COLUMN path.

**Cleanup safety limits and cleanup history**
* Fixed: the daily spam/bot cleanup no longer stops working on spam-heavy sites. Because that pass only ever matches spam-typed sessions, its matched share of the sessions table was permanently above the mass-delete safety limit, so the run aborted every night ("Mass-delete circuit breaker: spam_daily_tier cleanup aborted — it matched 8329 of 12286 sessions (67.8%...)") and spam accumulated without bound. Spam, bot and automated sessions are now an exempt class: the daily tier purges them unconditionally, within the unchanged per-run cap (`opti_behavior_spam_daily_max_sessions_per_run`, default 5000) and 500-row batches, so a backlog drains over successive nightly ticks.
* Changed: scheduled cleanup now performs a partial run instead of aborting wholesale. When your saved conditions include spam traffic, the spam subset is always deleted and the safety limit is measured on the non-spam rules against the non-spam session count only. If that trips, only the non-spam rules are held for review and the run is logged as "Partial" with an explanatory warning — previously the whole run, including harmless rules, was cancelled.
* Changed: the safety limit itself is unchanged (50% share, 100-session floor) — it now protects legitimate sessions only, which is what it was added for after the 2026-08-15 incident.
* Added: `opti_behavior_cleanup_spam_bypasses_safety_limit` filter (escape hatch). Return `false` to restore the previous behavior, where spam rows count toward the safety limit and a tripped limit aborts the whole automated run. Receives the context ('spam_daily_tier' or 'scheduled'). The Danger Zone master toggle for the daily spam tier is unchanged and still disables the pass entirely.
* Removed: the 30-day aged-spam trickle fallback and its `opti_behavior_spam_trickle_min_age_days` filter. It only existed to leak a little spam past the blocked breaker; the daily tier now deletes recent spam directly.
* Changed: Cleanup History collapses consecutive identical entries into one row with an "×N — repeated since <date>" badge, so a nightly repeat no longer floods the list and pushes the interesting runs out of the 20-entry history.

**Internationalization**
* i18n: All funnel and user-journey admin messages are now translatable (added missing translation wrappers; refreshed .pot catalogs)

**Funnel suggestions on busy hosts**
* Fixed: "Could not load funnel suggestions" could appear on the Funnels page on busy sites. The page loads its data through several background requests at once, and on a memory-constrained host one of them could fail before it started. The funnel requests now raise the admin memory limit the same way the rest of the admin does, and the suggestions panel retries its first load once before showing an error.

**The Suggested Funnels panel**
* Changed: the "Suggested Funnels" panel no longer dominates the Funnels page once you have funnels. It now opens as a single summary line ("2 new · 8 created") with Show and Re-scan site, and remembers whether you left it open or closed. The full panel is unchanged in the empty state, where it is still the fastest way to get started.
* Changed: when you expand the panel, suggestions you have not created yet come first and the ones you already built are grouped behind "Show created (N)". Nothing is hidden from you — every suggestion is still listed, flagged and one click away.

**Automatic funnel creation**
* Added: automatic funnel creation. Opti-Behavior now detects what kind of site you run and suggests ready-made funnels for it on the Funnels page — in the empty state and above your funnel list. Detection covers WooCommerce, Easy Digital Downloads, blog/content, lead generation, signup/registration, membership (MemberPress, Paid Memberships Pro, Restrict Content Pro), LMS (LearnDash, Tutor LMS, LifterLMS) and booking (Amelia, Bookly, WooCommerce Bookings).
* Added: one-click funnel creation from a suggestion, plus a "Set up recommended funnels" bulk action and a per-card "Customize" that opens the normal builder pre-filled with the suggested steps.
* Added: every suggested step URL is resolved through the source plugin's own API, so localized store slugs (`/panier/`, `/commander/`, `/kasse/`) are used as-is — nothing is hardcoded in English.
* Added: "Re-scan site" button on the Funnels page to refresh detection after installing or configuring a plugin, and a per-card Dismiss for suggestions you do not want.
* Added: optional "Create the recommended funnels for my site" checkbox in the onboarding modal, unticked by default. Activation still creates no funnel — suggestions are shown, never applied silently.
* Added: funnels now record where they came from (`source` / `recipe_id`), so re-scanning never produces duplicates. A suggestion matching a funnel you already have is flagged "similar funnel exists" with a link to it, instead of disappearing from the list.
* Added: new `opti_behavior_funnel_site_context`, `opti_behavior_funnel_recipes` and `opti_behavior_funnel_recipe_steps` filters plus an `opti_behavior_funnel_created` action for developers extending detection or the recipe catalog.
* Fixed: Restrict Content Pro registration and account pages never resolved (the detector called accessor names RCP does not ship), and Tutor LMS was matched against a class name that is actually a namespace. Both families are now verified against the plugins' real APIs.
* Changed: all funnel writes go through a single shared persistence path, so every create/update purges page caches exactly once.
* Pro: newly created funnels are backfilled from your existing session history, so they show real numbers immediately instead of starting empty. Also adds data-driven "discovered" funnels mined from your real traffic, advanced recipes, and a weekly automatic re-scan that tells you when a new signal appears.
* Pro: fixed a silent 50,000-row truncation in funnel backfill — long histories are now paged through completely.

= 1.8.3 - 2026-08-27 =
* Added: Filter Profiles — save a named set of advanced-filter values (Visitor, Session, Pages & Traffic, UTM) and reuse it across the Analytics Dashboard, Funnels, and Pro screens. Save / Edit control sits next to Apply / Reset; date range is never stored.
* Added: configurable cache purge after funnel modification. New Funnels setting to purge all page caches on every save/delete/status change (default) or never. With "Never", cached pages keep the old funnel config until the cache expires. Per-mutation override via the new `opti_behavior_should_purge_cache` filter (receives the action and funnel ID).
* Added: schema parity for Pro's Error Tracking visitor filters. Error, friction, and performance tables now store visitor country; friction and performance also store OS. Existing rows are backfilled. Data-model change only — no free-side behavior change.
* Fixed: cached-page visitor merging — anonymous visitor and session IDs baked into cached HTML made every direct visitor count as one visitor in one session. Identity is now recomputed server-side on each (uncached) tracking request, preserving cookieless privacy.
* Fixed: cached-page traffic under-counting — a stale baked nonce caused bounce visits to go unrecorded. The page-view/session-start request now re-sends once with the fresh nonce, and click batches queued during a refresh are preserved.
* Fixed: cached-page funnel under-counting — with two or more active funnels, a stale nonce silently dropped every step past the first. Funnel tracking now refreshes the nonce once and re-sends each step.
* Changed: lockstep release keeping free and Pro version numbers in sync with Pro's Error Tracking filter enhancement. Free-side change is limited to a shared filter-ui stylesheet sync.

= 1.8.2 - 2026-08-16 =

* New: re-architected, user-configurable data retention — set your own tiered retention periods so the plugin auto-manages storage, keeps the database lean and stops resource/space bloat, all from a rebuilt Smart Cleanup screen.
* New: visitor-segment filtering — slice dashboard stats and every heatmap page by visitor type and attributes, so you can read behavior per segment.
* Enhancement: heatmap list and detail pages now scale to 500K+ recording files, with faster heatmap table loading on large datasets.
* Fixed: heatmap session totals are now consistent across the list, filters and detail page (the reset floor is applied everywhere).
* Enhancement: redesigned heatmap detail page — filter option counts scoped to the hero session set, detail date inputs synced with the presets, and a more compact stats layout.
* Enhancement: never-synced pages are merged into the heatmap fast path instead of forcing a full scan.
* Fixed: cache poisoning — bot and IP exclusion moved from asset enqueue to data ingest, so cached pages no longer skew stats.
* Fixed: session-duration over-accumulation and spam-excluded average session time.
* Fixed: A/B variant filters are treated as advanced result filters, and stale/under-counted filter options under A/B variant scope are corrected.
* Enhancement: simplified the sessions pill tooltip to single-number semantics.
* Enhancement: Top Pages widget redesigned with a stacked layout; the Top Engaged Users table now fills the widget height instead of a fixed 380px cap.
* Fixed: on large sites, upgrading could make the site unreachable — heavy database migrations and index builds now run in the background (one step per cron tick, resumable), never in a web or AJAX request.
* Enhancement: the storage stats tab now loads asynchronously to stop long blank-page waits.
* Enhancement: debug mode auto-disables after 3 hours and debug JavaScript is no longer loaded when debug is off.
* Fixed: the Admin Language setting had no effect on WordPress 6.7+ — translations now load through WordPress's standard pipeline, with a new "Same as WordPress" default, and all locale catalogs were refreshed.

= 1.8.1 - 2026-08-01 =
* Fix: Bug in the last update that stopped the plugin.

= 1.8.0 - 2026-08-01 =
* New: Interactive heatmap preview — click to expand accordions, menus, popups and other collapsed elements directly inside the preview, with clicks anchored to their element and redrawn correctly as it's shown/hidden. Preview now also renders at the selected device's real viewport width (mobile/tablet/desktop), so heatmaps match the actual responsive layout.
* New: IP exclusion setting to exclude specified addresses from tracking.
* Fix: Guest preview iframe AJAX/REST requests failed nonce checks by running with admin cookies instead of the guest context.
* Enhancement: Tracker assets are cache-busted/versioned with the plugin version, and the anon broker script is registered in the optimizer-compat registry so cache/optimizer plugins never delay it.
* Enhancement: Filter-bar buttons on the heatmap page aligned to filter select height; "All devices" view reprojects anchored clicks onto the current layout for consistent hotspots.

= 1.7.2 - 2026-07-15 =
* Enhancement: Smart Insights notification cards, the Smart Insights center list, and the insight detail footer now show when each signal was detected as a relative time ("4 hours ago") with the exact localized date and time on hover.
* Fix: Saving Traffic Classification settings no longer resets the "Track admin users" preference — the admin tracking setting saved on the same tab is now preserved instead of being silently re-enabled.

= 1.7.1.2 - 2026-07-14 =
* Enhancement: Smart Insights usability release — notification cards, the Smart Insights center list, and the insight detail view now show when each signal was detected, as a relative time with the exact localized date and time on hover.
* Changed: version synced with Opti-Behavior Pro 1.7.1.2 to keep both plugins on the same version.

= 1.7.1 - 2026-07-12 =
* Feature: Added a tracker heartbeat detection layer — if site traffic keeps flowing but no heatmap/funnel/A/B events arrive for six hours, a dismissible admin notice identifies the caching or optimization plugin most likely blocking the trackers, with a link to the fix guide.
* Feature: Added an early-event capture queue printed at the very top of the page, so clicks and interactions that happen before the (deferred or delayed) tracker script loads are buffered and replayed instead of lost. Guarantees zero missed early clicks under WP Rocket "Delay JavaScript execution" and similar optimizers.
* Enhancement: Centralized the cache and page-optimizer compatibility logic into a single `Opti_Behavior_Optimizer_Compat` layer, replacing the duplicated exclusion rules that lived across the heatmap, funnel, and Pro tracking classes.
* Enhancement: Unified the tracking script-tag protection attributes (`nowprocket`, `data-cfasync="false"`, `data-no-optimize`, `data-no-defer`, `data-noptimize`, `data-jetpack-boost="ignore"`) so every self-hosted tracker is shielded consistently from JS minify, combine, defer, and delay optimizations.
* Enhancement: Registered verified optimizer exclusion filters — WP Rocket (minify/combine, defer, deferred and combined inline JS), SiteGround Optimizer (handle-based combine and inline combine), Perfmatters (defer and minify), WP-Optimize (URL-substring minify), Jetpack Boost (concatenation), LiteSpeed Cache (defer), W3 Total Cache (tag minification), and Breeze (aggregation) — all fed from the shared protected-scripts registry for zero-config coverage.
* Enhancement: A/B tracking batches now retry up to 3 times with backoff on network or HTTP failure (nonce re-read on every retry), and expired security nonces are transparently refreshed with one retry, so conversions recorded on long-cached pages are no longer rejected. Server-side unique keys keep retries idempotent.
* Enhancement: A/B variant assignment now also sets a companion `opti_ab_v` cookie registered with WP Rocket and LiteSpeed Cache dynamic-cookie/vary lists, so variant-specific caching stays correct.
* Enhancement: Preview and editor requests now set cache-bypass constants (`DONOTCACHEPAGE`, `DONOTROCKETOPTIMIZE`) so page previews are never optimized or cached.
* Enhancement: Activating or deactivating the plugin now purges all known full-page caches (WP Rocket, LiteSpeed, W3 Total Cache, WP Super Cache, WP Fastest Cache, Cache Enabler, Hummingbird, SiteGround Optimizer, Autoptimize), so stale cached HTML never keeps serving trackers that no longer match the plugin state. Page caches are also purged when funnels change, so new funnels start tracking on cached pages immediately.
* Performance: Cut per-visitor admin-ajax request volume by roughly 90% through consolidated tracker batching and reduced flush frequency, stopping site-wide slowdowns on busy sites.
* Fix: WP Rocket minify/combine and defer exclusion patterns were emitted as self-delimited regexes that never matched once WP Rocket joined and re-wrapped them; they are now bare regex fragments, restoring tracker exclusion under "Minify/Combine JavaScript" and "Defer JavaScript".
* Fix: SiteGround Optimizer exclusion filters now receive script handles (previously filenames, which never matched), and WP-Optimize filters now receive URL substrings only — both silently ineffective before. Removed a Jetpack Boost render-blocking filter that does not exist in the plugin; concatenation exclusion via `js_do_concat` remains and is verified.
* Fix: Funnel "Exact match" steps compared the full page URL against the stored path pattern with raw string equality, so path-only patterns (e.g. `/checkout/`) never matched and conversions silently recorded zero. Matching is now a normalized comparison (scheme/host aware, trailing-slash and case insensitive, fragments ignored, query compared only when the pattern includes one), mirrored in PHP and JS.
* Fix: Funnels analytics queried the wrong sessions table and columns, so funnel reports could undercount or miss sessions entirely.
* Fix: A new funnel did not appear in the dashboard until a manual page refresh.
* Fix: Pages with an active A/B test send `Cache-Control: no-store` and set `DONOTCACHEPAGE`, so page caches and CDNs never serve stale variant HTML or expired nonces.
* Fix: Element A/B variant changes never rendered for non-`#id` selectors (class, attribute, or path selectors); all valid CSS selectors now apply.
* Fix: The A/B unload flush stayed disarmed after the first tab switch, dropping conversions recorded near the end of a visit.
* Fix: With the Pro add-on deactivated, the heatmap dashboard showed no data when "Exclude spam traffic" was on — the spam allow-list depended on a table only Pro populates. It now also accepts equivalent evidence from the free tracker's own pageview records, so free-only installs keep full heatmap visibility with identical spam/bot/duration gates.
* Fix: The heatmap tracker crashed when optimization plugins delayed script execution; it now initializes safely regardless of load order.
* Fix: Heatmap overlays failed on very tall pages in Firefox due to the browser canvas area cap; rendering now respects the cap and stays visible.
* Fix: `CREATE TABLE IF NOT EXISTS` statements caused dbDelta fatals under W3 Total Cache database caching; table creation is now dbDelta-safe.
* Fix: Empty page titles are backfilled from tracked data and orphan URL-less page stubs are removed, so pages stop showing as "Untitled Page".
* Maintenance: Safer data-cleanup defaults for new and updated installs — scheduled cleanup now runs daily (was weekly), the short-session cleanup rule is now "shorter than 5s, older than 1 day" (was 2s/30 days), and the spam duration threshold is now 3s (was 10s). Existing installs receive the new defaults once after update.
* Developer: Added the `opti_behavior_protected_scripts` filter (`files`, `handles`, `inline_keys` buckets) so add-ons can register their own trackers with the compatibility layer.

= 1.7.0 - 2026-07-04 =
* Performance: Rebuilt the Analytics dashboard and Heatmaps page for large sites — parallel cached widgets, four collapsible sections, chart rendered from the shared stats payload, and pre-computed indexed heatmap aggregates. Cold loads drop from ~35–50s to seconds; all displayed numbers are identical and live.
* Fix: Rewrote the User Intent query to drop a fan-out join that corrupted intent classification, and resolved dashboard load races (duplicate widget AJAX, chips stuck on "—", stuck chart spinner).
* Enhancement: Redesigned the collapsible section headers and added a heatmap schema migration plus a `tools/backfill-heatmap-aggregates.php` pre-warm script.
* Compliance: Passed the WordPress.org Plugin Check with no warnings; bumped to 1.7.0 and synced the Pro add-on to the same version. No data changes.

= 1.6.5 - 2026-06-28 =
* Feature: Added a per-step session-recording replay deep-link to the Funnel report so you can jump straight from a funnel step into the matching recordings, plus Funnel page layout improvements.
* Enhancement: Completed admin-interface translations for French, German, Spanish, Brazilian Portuguese, and Italian so all menus, settings, dashboards, tables, KPI labels, and popups are fully localized.
* Fix: Scroll heatmap now shows true scroll reach — the cumulative percentage of sessions that scrolled to each depth (100% at the top, fading down) instead of a viewport-stop dwell density that duplicated the Attention heatmap.
* Fix: Corrected scroll-reach aggregation to be session-aware and monotonic, seeded the top band at 100%, and fixed parser normalized-data detection and a viewport double-count. Click, Move, and Attention heatmaps are unchanged.
* Fix: Restored Heatmap Detail filters that returned empty on the "All Devices" view.
* Fix: Corrected Heatmap Detail filter country flags and browser icons, plus related detail/list UI issues.
* Fix: Improved the Heatmap "Delete Heatmap Data" flow so the confirmation notice stays visible and the current view is preserved after deletion.

= 1.6.4 - 2026-06-25 =
* Fix: Corrected the Dashboard "vs previous period" trend for Bounce Rate, Average Session Duration, and Average Scroll Depth so it compares against real previous-period values instead of always showing 0%.
* Fix: Restored the missing Bounce Rate KPI sparkline so the card now renders its daily mini bar chart like the other KPI cards when spam filtering is enabled.
* Fix: Improved the KPI sparkline hover tooltip so it appears fully above the hovered bar without being clipped or covering the card's number and percentage.

= 1.6.3 - 2026-06-21 =
* Enhancement: Improved mobile display compatibility across Dashboard, Settings, Heatmap, Funnel, and A/B Testing admin screens with more responsive layouts and controls.
* Fix: Improved Dashboard history/stat rendering for sparse datasets, Bounce Rate and daily_history metric arrays, widget date ranges, and Traffic Overview zero-origin behavior.
* Fix: Refined Heatmap detail/list behavior with pending/loading feedback, multi-select filter consistency, average-time formatting, and metric alignment.
* Security: Strengthened data-safety defaults around Smart Data Cleanup migrations and canonical spam-filtered analytics contracts so reports avoid unsafe or noisy traffic data.

= 1.6.2 - 2026-06-14 =
* Feature: Added Smart Insights to Scheduled Reports so report emails can include prioritized insight cards with current evidence, scope, and next-action summaries.
* Fix: Aligned Scheduled Reports analytics queries with the Traffic Behavior spam-filter settings so report totals follow the same canonical filtering policy as the dashboard and Smart Insights.
* Fix: Corrected multi-select behavior in the filter list so selected filters remain accurate and usable.

= 1.6.1 - 2026-06-09 =
* Fix: Kept the Dashboard Traffic Classification widget aligned with the live Sessions KPI when spam filtering is enabled by using the same KPI session baseline instead of a cached Traffic Overview baseline.
* Maintenance: Bumped widget cache keys so stale traffic-classification transients from earlier dashboard releases are ignored.

= 1.6.0 - 2026-06-08 =
* Feature: Added canonical spam-filtered analytics reporting across Dashboard widgets, Heatmaps, Funnels, A/B Testing, Smart Insights, exports, post meta-box analytics, and the Frontend Stats Bar so page/session totals stay consistent across every report.
* Feature: Added Smart Data Cleanup upgrades in the Settings Danger Zone, including selectable cleanup categories, date-range cleanup, previewable condition-based cleanup, scheduled cleanup controls, safe session-child cascades, file cleanup, orphan visitor handling, table optimization prompts, and cleanup progress logging.
* Enhancement: Improved Traffic Behavior spam defaults, threshold saving, bot/spam classification, and explicit spam-filter handling so low-value traffic is excluded consistently while admin filters remain predictable.
* Enhancement: Improved Heatmap list/detail counters, session-page drilldowns, recordings KPI alignment, and page analytics aggregation to keep visible totals synchronized with stored analytics facts.
* Enhancement: Improved the A/B Visual Editor element target picker, variant preservation, and spam-filtered result calculations for more reliable experiment setup and reporting.
* Fix: Resolved Smart Insights welcome-gate handling and aligned Smart Insights signal generation, weekly summaries, notifications, and stale-card cleanup with the canonical analytics and spam-filtering rules.
* Maintenance: Expanded regression and release QA coverage for analytics consistency, spam filtering, Smart Cleanup, A/B testing, Heatmaps, Dashboard widgets, Smart Insights, and Settings.

= 1.5.2 - 2026-05-28 =
* Fix: Added file-mtime cache busting and inline critical layout CSS for the edit-post analytics meta-box controls so uploaded responsive fixes override stale admin CSS/JS caches.

= 1.5.1 - 2026-05-28 =
* Fix: Bust edit-post analytics meta-box CSS and JavaScript caches so uploaded layout fixes load immediately in WordPress admin.

= 1.5.0 - 2026-05-26 =
* Feature: Added Smart Insights, a self-hosted recommendation engine that turns local behavior analytics into prioritized optimization signals.
* Feature: Added a Smart Insights admin center with severity/status filters, search, detail views, reviewed/in-progress workflow, and dashboard summaries.
* Feature: Added Smart Insights notifications, launcher behavior, scheduler refreshes, settings, tooltips, and multilingual admin copy coverage.
* Enhancement: Improved dashboard exports, Roadmap placement/design, A/B welcome-gate behavior, and Settings data-reset handling.
* Fix: Added a shared administrator contact resolver for install tracking, welcome/trial flows, and Pro registration compatibility.
* Maintenance: Expanded Free QA coverage for Smart Insights, dashboard exports, A/B testing, settings, and admin-menu contracts.

= 1.4.0 - 2026-05-14 =
* Feature: Added file-based statistics and analytics exports that save Opti-Behavior data as CSV or JSON for use in external tools, reporting workflows, integrations, and AI-agent analysis.
* Enhancement: Added multilingual survey copy coverage (`fr_FR`, `de_DE`, `es_ES`, `pt_BR`, `it_IT`) and ensured plugins.php honors the Opti-Behavior admin language setting.

= 1.3.1 - 2026-05-04 =
* Fix: Keep Free click heatmap detail working when Pro is disabled by loading the Free detail page and AJAX handlers correctly.
* Fix: Pro runtime detection no longer treats the Free fallback `opti_behavior_pro_active()` helper as an active Pro runtime.
* QA: Added regression coverage for the Pro-disabled Free click heatmap detail path.

= 1.3.0 - 2026-05-03 =
* Feature: Added a delayed WordPress.org review reminder banner with Opti-Behavior branding, shown to admins after 7 days of plugin use with review, done, remind, and hide actions.
* Feature: Frontend Stats Bar metrics now link admins to the relevant detail pages for faster page-level analysis.
* Enhancement: Frontend Stats Bar layout now dynamically compacts and wraps metrics so Pro metrics remain visible on narrower screens.
* Enhancement: Refined the onboarding setup wizard styling, copy, and welcome-page flow.
* Fix: Heatmap Detail iframe height no longer enters viewport-height feedback loops on pages with 100vh/min-height wrappers, preventing runaway growth and clipped footers.
* Fix: Hardened heatmap reset SQL and A/B Visual Editor redirect handling.
* Maintenance: Synced the Free plugin title, package metadata, version constant, readme stable tag, and changelog for the 1.3.0 release.

= 1.2.9.3 - 2026-05-03 =
* Fix: Heatmap Detail iframe height no longer enters viewport-height feedback loops on pages with 100vh/min-height wrappers, preventing runaway growth and clipped footers.
* Fix: Added safer cache-busted heatmap asset versioning for this hotfix release.
= 1.2.9 - 2026-05-01 =
* Feature: Added a per-page heatmap reset button on Heatmap Detail pages so admins can delete stale heatmap data after major page redesigns without deleting session recordings, sessions, or analytics history.
* Enhancement: Optimized and polished the Frontend Stats Bar overlay for cleaner frontend admin stats display.
* Enhancement: Added advanced GDPR compact consent banner controls for improved privacy-banner design and behavior.
* Fix: A/B Visual Editor launch and preview flows remain popup-safe with browser privacy extensions and ad blockers.

= 1.2.8.1 - 2026-04-28 =
* Fix: A/B Testing Visual Editor launchers now use native direct links for saved variants, preventing ad blockers and popup blockers from making Open Visual Editor appear broken.
* Fix: Visual Editor Preview now uses a server-side save-and-redirect form flow instead of script-created popups, so preview opens reliably with unsaved changes.
* Enhancement: Added regression coverage for popup-blocker-safe Visual Editor opening and preview behavior.

= 1.2.8 - 2026-04-28 =
* Feature: Added expanded A/B testing tools for page-split experiments, visual variant previews, winner application, and conversion goal tracking.
* Feature: Added improved A/B test results reporting with impressions, conversions, conversion rate, and winner indicators.
* Enhancement: Improved A/B attribution for page-split variant pages and cross-page goals so experiment results stay accurate across visitor journeys.
* Maintenance: Prepared the Free plugin package metadata, version constants, readme stable tag, and changelog for the 1.2.8 release.

= 1.2.7 - 2026-04-09 =
* Feature: Selective data deletion in Danger Zone — 9 category checkboxes (Sessions, Visitors, Events, Heatmaps, Recordings, Traffic, Errors, Funnels, Forms) let users choose which data to delete instead of deleting everything
* Enhancement: Select All / Deselect All toggle for quick category selectio
* Fix: False-positive broken links — same-origin images and internal pages no longer flagged as "Blocked" when server blocks HEAD requests (LiteSpeed Cache, WAF). HEAD failures now fallback to GET verification before saving
* Fix: Error source now shows actual JS file path instead of generic "admin-ajax.php" — uses call stack capture at fetch/XHR call time
* Fix: Session recorder console.log/warn messages now gated behind the Debug & Logging "Enable JavaScript Debug Logging" setting — no more console spam on production sites
* Enhancement: JS Errors page file links now show full URL on mouse hover (tooltip) and are clickable to open the source file directly
* Enhancement: IMG resource error verification uses HEAD + GET fallback with _optiVerify flag to prevent XHR interceptor self-tracking


= 1.2.6 - 2026-04-7 =
* Fix: Attention heatmap showing click stats instead of scroll stats
* Enhancement: Admin tracking settings, admin bar offset, login detection
* Enhancement: Translations updated (FR, DE, ES, IT, PT-BR)
* Feature: Onboarding popup 

= 1.2.5.1 - 2026-04-5 =
* Enhancement: Replace raw console.log/warn/info in session-recorder.js
* Fix: All visitor-facing and admin console output now respects the debug logging settings in wp-admin

= 1.2.5 - 2026-04-5 =
* Fix: Session recording playback shows white empty page on live server — set inlineStylesheet:false to prevent oversized FullSnapshot payloads (3–7 MB) that Hostinger nginx rejects
* Fix: Added oversized-payload guard in session-recorder.js — warns when non-beacon payload exceeds 1 MB
* Fix: PHP empty-events guard — rejects AJAX saves with no events when no DB row exists yet
* Enhancement: Comprehensive debug logging in JS (FullSnapshot detection, save batch type distribution, server response) and PHP (error_log for event types, FullSnapshot presence, file save confirmation)
* Fix: Removed console plugin from rrweb config to eliminate type-6 events and extra payload bulk

= 1.2.4.2 - 2026-04-04 =
* Fix: Heatmap data protection improvements and welcome page refinements
* Enhancement: Minor code quality improvements across core files

= 1.2.4.1 - 2026-04-03 =
* Fix: Resolve PHP 8.2 null deprecations + wpdb prepare mismatch	

= 1.2.4 - 2026-04-03 =
* Fix: Resolved all WordPress Plugin Check errors and warnings (escape output, nonce verification, readme compliance)
* Fix: GDPR consent banner not displaying — admin-notices CSS/JS no longer hides plugin's own ob-* elements
* Enhancement: Default auto-cleanup on fresh install (weekly, 90-day retention, bot/bounce session removal)
* Enhancement: Moved Pro trial offer above feature list on welcome page for better visibility
* Fix: Consent banner logic simplified — removed obsolete checkbox, uses Consent Banner Source radios only

= 1.2.3 - 2026-03-29 =
* Feature: Frontend Stats Bar — admin-only analytics overlay on every frontend page with 6 color themes and per-stat visibility settings
* Feature: Custom SMTP email configuration for scheduled reports with WP Mail fallback, and Cron Monitor for scheduled task health
* Enhancement: Full cache plugin compatibility (Autoptimize, LiteSpeed, WP Rocket, SG Optimizer) — nonce refresh, client-side cookie IDs, script tag protection, and visibilitychange flush
* Enhancement: Optimized live visitors query, esc_sql() hardening, admin submenu reorder, and PHPCS compliance fixes
* Fix: 10 Smart Data Cleanup bugs (recording file deletion, cascade orphans, scheduling), debug log download fatal error, and auto-cleanup via daily cron

= 1.2.2 - 2026-03-22 =
* Feature: Rich banner styles — info, warning, success, promo, custom with configurable colors, images, and CTA buttons
* Enhancement: Dismiss tracking stores timestamps for duration-based re-show logic with automatic migration from old format
* Fix: Self-referral bug — site's own domain no longer appears as referrer in analytics, user journey, and form analytics views

= 1.2.1 - 2026-03-17 =
* Feature: Server-side proxy for heatmap iframe loading — bypasses CDN-level X-Frame-Options restrictions (e.g., Hostinger) that block iframe embedding
* Enhancement: Heatmap iframe now uses `srcdoc` with proxied HTML content, injecting `<base href>` for correct relative URL resolution
* Enhancement: Generic JS scan to detect and cap elements with inflated inline heights from unknown/custom slider frameworks
* Fix: Heatmap iframe blank/error on sites with CDN-level `X-Frame-Options: deny` (e.g., Hostinger-hosted sites)
* Fix: Server-side proxy added to both Free and Pro AJAX classes to prevent action not registered error when Pro overrides Free
* Fix: Removed broken CDN Lucide CSS (`cdn.jsdelivr.net`) from Pro detail page that caused MIME type error
* Security: Proxy endpoint restricted to same-site URLs only, with nonce verification and `manage_options` capability check

= 1.2.0 - 2026-03-11 =
* Feature: "Try Pro FREE for 6 Months" admin banner with trial countdown, dismiss, and expired state variants
* Feature: ipwho.is secondary geolocation API fallback when ip-api.com is rate-limited (free, HTTPS, no rate limit)
* Enhancement: License-aware trial banner visibility using Manifest Manager (hidden for valid Pro license, shown for expired trial)
* Enhancement: Geolocation fallback chain expanded: CloudFlare → Cache → ip-api.com → ipwho.is → Timezone → Browser Language
* Enhancement: Added ipwho.is to External Services disclosure, FAQ, and Privacy Policy sections in readme.txt
* Fix: Trial banner dismiss button now removes element from DOM instead of CSS hide (fixes specificity conflict with admin-notices.css)
* Fix: Trial banner no longer appears when Pro plugin is active with a valid license
* Fix: "Unknown" country in Real-time Visitors resolved for high-traffic sites exceeding ip-api.com 45 req/min rate limit
* Fix: Stable tag mismatch between readme.txt and main plugin file header
* Fix: Short description trimmed to 150-character WordPress.org maximum

= 1.1.1 - 2026-03-10 =
* Fix: PHP version compatibility check was comparing against non-existent PHP 7.6 instead of 7.4, preventing activation on PHP 7.4.x servers
* Enhancement: Added OptiUser API (api.optiuser.com) and OptiUser Website (optiuser.com) to External Services disclosure for WordPress.org compliance
* Enhancement: Expanded FAQ "Does this plugin call any external services?" with detailed list of all 4 external services
* Enhancement: Added "Try Pro FREE for 6 months" call-to-action in Pro Features section with direct download link
* Enhancement: Updated upgrade pages with 6-month free Pro trial messaging and hidden download page URL

= 1.1.0 - 2026-03-09 =
* Feature: Plugin install tracker with 24-hour heartbeat mechanism for anonymous usage statistics
* Feature: Automatic plugin type detection (Free/Pro) in tracker heartbeat data
* Feature: Deactivation notification to API for immediate status updates
* Enhancement: Autoloader class conflict prevention for shared Free/Pro classes (Ajax, Detail Page, Parser, Cache)
* Enhancement: Heatmaps sessions column now uses file-based device counts (Desktop + Mobile) for accurate sorting
* Enhancement: Heatmap table column widths rebalanced to accommodate tooltip icons and translations
* Enhancement: Table headers no longer truncated — always fully readable with nowrap styling
* Enhancement: Title truncation moved from PHP to CSS text-overflow for cleaner hover tooltips
* Fix: Autoloader excluding shared Pro/Free classes to prevent Free overriding Pro AJAX handler
* Fix: Heatmap detail page duplicate rendering caused by auto-instantiation
* Fix: SQL prepared statement parameter mismatch when date filters were active on heatmaps
* Fix: Sessions ORDER BY alias referencing non-existent table alias
* Fix: Plugin re-activation now triggers immediate heartbeat to update API status
* Fix: Removed unexpected ARCHITECTURE.md file from plugin root (Plugin Check compliance)
* Fix: Wrapped all error_log() calls in WP_DEBUG guards for production safety
* Fix: Synced Stable tag and Plugin Name between readme.txt and main plugin header
* Fix: Removed localhost/development URL from tracker API endpoint
* Code Quality: Clean uninstall with tracker options and cron job cleanup

= 1.0.9 - 2026-02-10 =
* Feature: Smart Data Cleanup system with bot/spam removal, quality thresholds, and scheduled auto-cleanup via WordPress cron
* Feature: Comprehensive tooltip system across all pages (Dashboard, Heatmaps, Funnels, Settings, Form Analytics, Error Tracking)
* Feature: Form Analytics upgrade page with menu integration, database table handlers, and scheduled report support
* Feature: Danger Zone redesign with horizontal sub-tabs (Full Reset, Date Range, Smart Cleanup, Auto Schedule)
* Feature: German (de_DE) language support with complete translations
* Feature: Italian (it_IT) language support with complete translations
* Feature: Spanish (es_ES) complete translation files
* Feature: Portuguese (pt_BR) complete translation files
* Enhancement: Replaced all emoji icons with Lucide SVG icons throughout the plugin for professional UI
* Enhancement: Unified page header style across all pages (Dashboard, Heatmaps, Funnels, Settings, Recordings, Errors)
* Enhancement: Country flag icons in language dropdown selector
* Enhancement: Funnel step cards made more compact with improved layout and per-funnel country filter with flag icons
* Enhancement: Heatmaps page search functionality and mobile preview mode for heatmap iframe
* Enhancement: Guest preview mode for accurate non-logged-in heatmap display
* Enhancement: Replaced Data Protection tab with Storage Stats page with improved tooltips
* Enhancement: Standardized button styles with Lucide icons and btn-danger class for destructive actions
* Enhancement: Added User Journeys and Form Analytics data to scheduled email reports
* Enhancement: Improved browser/OS detection with HarmonyOS support and better bot detection
* Enhancement: PRO feature gating with badges on menu items, heatmap tooltips, and blocked PRO heatmap types for free users
* Enhancement: Admin menu icon updated to 35x35 PNG with hover states
* Enhancement: French translations extensively improved with shortened menu labels
* Enhancement: AI Insights panel with Lucide icon styling and default message
* Fix: Move Heatmap trajectory rendering with proper coordinate scaling and adaptive colors based on website background
* Fix: Scroll Heatmap legend positioning and visibility
* Fix: Attention Heatmap legend positioning moved outside iframe with smooth gradients and base color coverage
* Fix: Bounce rate KPI mismatch with daily history chart
* Fix: Heatmaps page Mobile Traffic showing 0% - Device Split now uses sessions data
* Fix: Session count mismatch between total and device split
* Fix: Time period filter icon and dropdown functionality with correct default selection
* Fix: Traffic Overview chart layout with reduced empty space
* Fix: Funnel URL matching filters and string concatenation bug
* Fix: Conditional cleanup settings not persisting after page refresh
* Fix: Date range file deletion now includes uploads/opti-behavior-data/ directory
* Fix: Delete All Data not clearing storage properly
* Fix: Top Engaged Users widget column width for long country names
* Fix: Scheduled reports SQL error and instant stats update
* Fix: Heatmap download now includes page content with overlay
* Fix: Stat history bar charts display
* Fix: Stats inconsistency when Pro is active
* Code Quality: WordPress Plugin Check - 0 errors, 0 warnings (100% compliant)
* Code Quality: Renamed non-prefixed variables in HTML templates with opti_behavior_ prefix
* Code Quality: Complete uninstall cleanup with all database tables, cron jobs, transients, and legacy directories

= 1.0.8 - 2025-12-08 =
* Feature: User Intent Rules - Advanced system for analyzing and categorizing user behavior patterns
* Enhancement: Analytics Dashboard time filter now defaults to 30 Days for better data overview
* Fix: Improved favicon handling for referrer websites with proper fallback support

= 1.0.7 - 2025-12-02 =
* Enhancement: Added French language translations for improved internationalization
* Fix: Resolved sendPageView function issues for accurate page tracking
* Fix: Corrected Returning Visitors calculation and display
* Fix: Fixed Logged In Visitors detection and counting
* Feature: Display username for logged-in visitors in Top Engaged Users widget
* Enhancement: Extended device type support for all device categories (desktop, mobile, tablet, PC)
* Code Quality: WordPress coding standards compliance improvements
* Code Quality: Added debug logging controls via settings page
* Security: Fixed nonce verification warnings
* Security: Enhanced prepared SQL statements with proper phpcs annotations

= 1.0.6 - 2025-11-30 =
* Feature: New vs Returning Visitors analytics dashboard widget
* Feature: Visited Directories analytics with depth tracking and page views
* Feature: Visitor Authentication analytics showing logged-in vs guest users
* Fix: WordPress DB coding standards - SQL wildcards now use placeholders
* Enhancement: Improved prepared SQL statements compliance
* Code Quality: Full WordPress.DB.PreparedSQLPlaceholders compliance

= 1.0.5 - 2025-11-23 =
* Fix: Removed all debug error_log() calls from production code
* Fix: Replaced date() with gmdate() for timezone-safe date handling
* Fix: Added translator comments for i18n compliance
* Fix: Updated API URL from localhost to production endpoint
* Fix: Corrected stable tag version mismatch
* Enhancement: Improved readme with better descriptions and FAQ
* Enhancement: Added Plugin URI and updated Author URI
* Enhancement: Optimized WordPress.org directory submission compliance
* Compatibility: Full WordPress 6.8 compatibility verified
* Enhancement: Added COALESCE for better handling of NULL titles in Top Pages
* Enhancement: Improved country detection with browser language fallback when IP geolocation fails
* Enhancement: Top Pages widget now displays page views instead of clicks for better accuracy

= 1.0.4 - 2025-11-20 =
* Enhancement: Added file-based storage system for high-traffic sites
* Enhancement: Implemented automatic bot detection and filtering
* Enhancement: Added performance optimizer with automatic database indexing
* Enhancement: Separate mobile and desktop heatmap tracking and visualization
* Enhancement: Batch processing for improved performance
* Enhancement: Enhanced debug logging system with WordPress-compliant manager
* Enhancement: Added Lucide icon library (v0.554.0, ISC License) for modern UI
* Security: Replaced direct filesystem operations with WP_Filesystem API
* Security: Replaced unlink() with wp_delete_file() for file deletion
* Code Quality: WordPress coding standards compliance improvements
* Code Quality: Improved data sanitization and validation
* Compatibility: Tested up to WordPress 6.8

= 1.0.3 =
* Security: Fix Unsafe SQL calls
* Security: Fix files and directories locations use
* Security: Moved inline CSS to external stylesheet
* Security: Moved inline JS to external stylesheet
* Follows WordPress coding standards
* Plugin Check validation passed

= 1.0.2 =
Review and fix all the issues listed in the review email.

= 1.0.1 =
* Security: Enhanced sanitization for $_SERVER variables
* Security: Improved json_decode() data sanitization
* Security: Moved inline CSS to external stylesheet for WordPress compliance
* Code Quality: Added proper sanitization for all user inputs
* Code Quality: Enhanced data validation in AJAX handlers
* Compatibility: Verified all security checks are in place

= 1.0.0 =
* Initial release
* Visual heatmap tracking
* Real-time analytics dashboard
* Page performance metrics
* User journey tracking
* GDPR compliance features
* Data export functionality
* Multisite support
* Debug mode for troubleshooting
