Enable Session Replay for a Tenant
Session replay records how visitors move through a tenant site (pages, clicks, scrolling, where something breaks) on our own OpenReplay instance. It is off for every brokerage until you give that brokerage a project key. Turning it on also turns on the recording section of that site’s privacy page, so the policy and the behaviour cannot drift apart.
Before you enable it
Section titled “Before you enable it”- The brokerage’s designated broker has confirmed in writing that their site may record visitor sessions.
- The replay provisioning key is on the machine you run onboarding from, at
~/.local/share/replay-gateway/homestar-provisioning.key(or pointREPLAY_PROVISIONING_KEY_FILEat it). It mints projects for our slugs and cannot read a single session. - Nothing on the tenant site renders data an MLS prohibits from display. Recording captures the page as drawn, so this is a check on the site, not on the recorder.
Enable it
Section titled “Enable it”-
Add an
analyticsblock to the brokerage’s spec under.onboarding/:analytics:session_replay: true -
Apply the spec. This mints the brokerage’s own replay project through the gateway, one per slug, and stores both the tracker key and the project’s data key on the brokerage row.
Terminal window make onboard-brokerage BROKERAGE=<slug>Re-running is safe: the gateway returns the same project (
existing) and the stored keys are left alone. -
Load the tenant site. The public layout now mounts the tracker, and
/privacyshows a Session Recording section quoting the enforced 30-day retention.
Leaving the analytics block out of a later re-run leaves recording as it is. Set session_replay: false and re-apply to switch it off.
What visitors get
Section titled “What visitors get”- Inputs are obscured in the browser before anything is uploaded. Contact and tour forms record that a field was used, never what was typed.
- Do Not Track and Global Privacy Control are honored. A browser sending either is never recorded, and the tracker is not even started.
- Admin and sign-in pages are never recorded. They use different layouts; only the public tenant layout mounts the tracker.
- Recordings expire after 30 days, enforced on the instance by a daily job. This is quoted verbatim on the privacy page from one setting,
OPENREPLAY_RETENTION_DAYS, so if the instance ever changes, change the setting rather than the prose.
What agents see
Section titled “What agents see”On the lead detail page, a Session replay card lists the recordings of the visits that produced the lead, newest first. Each shows when the visit started, how long it ran, the pages walked, and any issue signals the recorder saw (dead clicks, rage clicks, failed requests, script errors, and so on, with counts). Watch opens the replay in place. The card renders nothing when the tenant does not record or nothing was recorded.
The player URL is minted server-side each time the card loads and lives fifteen minutes. The brokerage’s data key never reaches the browser.
Where recordings show up
Section titled “Where recordings show up”Two places, and they answer different questions.
The lead detail page carries a Session replay card listing the visits that produced that lead, with the pages walked and any issue signals. That only ever covers people who filled something in.
The Visitors page (brokers and above) lists recorded visits whether or not they converted, ranked by how much the person actually looked at. Most traffic never becomes a lead, so this is where a long, unconverted browse becomes visible. Each row says how long they stayed, how many pages and listings they opened, and links to the lead if one exists.
Players are minted when you click Watch and live about fifteen minutes. The brokerage’s data key never reaches the browser.
How it joins to leads
Section titled “How it joins to leads”As soon as the tracker starts, the page reads its replay session id and announces it to the API, then repeats it with every behaviour batch. The API stores it on the visitor’s sessions row (replay_session_id) and, each time it changes, writes a replay_session_started event to the session timeline. Nothing of ours is sent to the replay instance; we hold their id, they hold nothing of ours.
Testing a tenant site locally
Section titled “Testing a tenant site locally”Tenant hostnames are not served by the dev container by default. To exercise one:
- Add the hostname to
DEV_TENANT_HOSTSin.env(comma-separated), for examplekroetch.l.homestar.ink, and make sure its prefix is inTENANT_PREFIXES. - Insert a
brokerage_domainsrow for that hostname pointing at the brokerage. - Publish an explicit DNS record for the hostname. The dev wildcard is a CNAME, which shadows the certificate challenge until an explicit record exists.
- Recreate
idx-app-dev. Caddy issues the certificate within a couple of minutes.