For one site, a recorder plus a player is within reach: an open-source library called rrweb already captures page changes and replays them, so an agent can wrap it in a collector, a SQLite store and a sessions list over a weekend, and add click and scroll heatmaps drawn over a stored page snapshot. The rough edges are what you pay Lucky Orange for: replays that hold together on pages with odd CSS, shadow DOM or canvas, heatmaps that stay sensible across screen sizes and changing pages, masking of form fields, and the chat, surveys and funnels in the same snippet. Recording visitors also brings consent duties that don't go away when you self-host.
Before you buildLucky Orange's free plan allows 100 sessions a month on one site, and Microsoft Clarity records without a traffic cap for free. Try one before building a collector of your own.
Build me a self-hosted heatmap and session-recording tool for my own site to replace Lucky Orange. Requirements: - Node.js 22 + TypeScript: Fastify and better-sqlite3 at ./data/lo.db. `npm start` serves http://localhost:4900 (dashboard at /, collector at /collect, snippet at /t.js). - Snippet: one `<script src="/t.js" data-site="...">`, built with esbuild around `rrweb` record(). Inputs and textareas are masked, elements with [data-private] are blocked, Do Not Track and a localStorage opt-out are honoured, and events go out in 5-second gzipped batches with sendBeacon on pagehide. - Collector: checks the site key from .env and an allow-list of origins, caps a session at 60 minutes or 5 MB, and stores sessions (id, first URL, user agent, viewport, start, duration) with event chunks as gzipped blobs. - Player: a Sessions page with filters (URL contains, device width, rage clicks, JS errors, duration) and a replay page using `rrweb-player` with 1x, 2x and 4x speed and skipping of idle time. - Heatmaps: per URL path and device class (under 600 px, 600-1024, over 1024), click, move and scroll-depth maps from stored events, drawn with `heatmap.js` over a snapshot rebuilt from that path's latest rrweb full snapshot. - Retention: sessions older than RETENTION_DAYS (.env) are deleted nightly, and the admin can delete any session by id. - Admin: one password in .env (signed cookie). One site first, with the site key and origins in .env. - Single user. No accounts, no telemetry, local-first; the dashboard makes no outbound calls. - Out of scope: live chat, surveys, funnels, form analytics, AI summaries, mobile SDKs, identifying visitors across sites. - README: adding the snippet to a Shopify or static site, a consent warning (in the EU and UK, load /t.js only after consent), megabytes stored per 1,000 sessions measured on this machine, and that replays of pages with cross-origin CSS may look broken.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Lucky Orange.
Add frustration signals to the session tool in this folder. Requirements: - Detect rage clicks (3 or more clicks within 700 ms inside a 30 px radius) and dead clicks (a click on an element that causes no DOM change or navigation within 1 second), computed when a session is finalised. - Store counts per session and show them as badges and filters on the Sessions page. - On the replay page, mark each frustration moment on the timeline so a click jumps to it. - Add tests with a synthetic event stream for each case. - Update the README.
Add per-page reports to the session tool in this folder. Requirements: - A Pages view lists URL paths with sessions, median scroll depth, share of sessions reaching 50% and 100% of the page, and the 10 most-clicked elements by CSS selector. - Clicking a path opens its heatmap with the same date range and device filter. - Merge query strings by default, with a setting to keep named parameters. - Add a CSV export of the table. - Update the README.
Add funnels to the session tool in this folder. Requirements:
- Define a funnel in the dashboard as 2 to 6 steps, each a URL path pattern or a custom event sent with
window.lo.event('name').
- Count sessions that reach each step in order within one session and show the drop-off between steps.
- From any step, list the sessions that dropped off there with a link to each replay.
- Save funnels in SQLite and cache results for 10 minutes.
- Update the README.A store owner or marketer gets one snippet and, within the hour, recordings and heatmaps, with chat and surveys in the same dashboard. Nobody has to host session storage, fix replays that break on odd pages, or wire up a Shopify app.
Estimate · Free on a machine you already run; a small VPS is about $5 a month, and disk use grows with how many sessions you keep. The build is token usage on your agent plan.
Checked 2026-10-19 against Lucky Orange's docs: 1, 2, 3, 4, 5
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Free | $0 | $0 | 100 tracked sessions a month, one site, no add-ons. |
| Build | $39 | $32 | 3,500 tracked sessions a month; heatmaps, recordings, surveys, live chat, funnels, form analytics and unlimited team members are in every plan. |
| Grow | — | $72 | 10,000 tracked sessions a month. |
| Expand | $249 | $199 | Starts at 50,000 tracked sessions a month. |
| Scale | $1,049 | $839 | Starts at 300,000 tracked sessions a month. |
A free plan covers 100 sessions a month on one site with no add-ons, per the help center; the pricing page itself advertises only a 7-day trial.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: Live chat, surveys and announcements in the same snippet, Conversion funnels and form analytics.
About $39 a month on the Build plan, $468 a year (checked 2026-10-19).
Live chat, surveys and announcements in the same snippet; Conversion funnels and form analytics; Heatmaps that hold up across devices and changing pages, and a live visitor view; Discovery AI summaries of what visitors did; Shopify and other platform apps, plus storage and retention handled for you. If any of those matter to you, keep paying.
Yes: Microsoft Clarity (free), PostHog (open source), OpenReplay (open source).