Monitor a Lovable app

Know when your Lovable app breaks for real visitors: see the errors they hit, watch what they did before it happened, and hand that evidence to your coding agent.

Where this stands: we haven't tested this setup end to end inside Lovable yet. The steps use Heystack's standard browser setup, which fits the kind of app Lovable builds. Where Lovable may get in the way, this page says so.

What you get

Once your app is connected, Heystack records what happens in your visitors' browsers:

  • Errors visitors hit. Every uncaught error in the browser, with its message and stack trace, lands in Explore › Logs, tied to the visit it happened in.
  • Session replay (optional). Watch what a visitor did before something went wrong. All text on the page and everything typed is masked by default, and password fields are always masked. See Session Replay.
  • Visits. Users & sessions lists each visit, what happened in it, and a replay when one was recorded.
  • Bug reports (optional). Ask Lovable to add a "Report a problem" button. Reports arrive in Issues with the page, the visit and the errors just before it attached. See In-app bug reports.
  • Your coding agent in the loop. Connect Cursor, Claude Code or another agent to Heystack so it can read the same errors and visits. See Give Cursor or Claude Code your production errors.

What Heystack can and can't see in a Lovable app

Lovable builds React web apps that run in your visitors' browsers. For the database, sign-in and server-side code, it usually uses Supabase. That split decides what Heystack sees today:

Part of your appSeen by Heystack today?
Pages running in the visitor's browserYes, with the setup below
Calls your pages make to other services (for example Supabase)Yes, if you turn on browser request tracing: each call shows how long it took and its status
Server-side functions in SupabaseNo. They run somewhere Heystack's setup doesn't cover yet
Your Supabase database and sign-inNo. Heystack has no Supabase connection
AI calls and their costNo, unless the AI call is made from server code Heystack supports. Calls made from the browser or from Supabase functions don't appear in AI & Safety

Set it up

  1. Create an app and a browser key. Sign in at console.heystack.dev and create an app (during early access, new accounts join a waitlist first). Then open Settings › App › Connection & keys, choose New browser key and copy it. It starts with hs_web_ and is shown once.

    Never use a server key (sk_live_…) in a Lovable app. Everything in a browser app is public.

  2. Ask Lovable to add Heystack. Paste this into Lovable's chat:

    Add Heystack monitoring to the browser side of this app.
    Follow the "Browser / web frontend" section of https://heystack.dev/heystack-setup.md.
    - Start Heystack once, in the app's client entry (src/main.tsx).
    - Read the key from VITE_HEYSTACK_WEB_KEY. It is a public, send-only Heystack browser key (hs_web_...).
    - Use the service name "my-lovable-app".
    - Never add a Heystack server key (sk_live_...) to this project.
    

    If Lovable can't open the link, open heystack-setup.md yourself and paste its "Browser / web frontend" section into the chat.

  3. Give it the key. The setup reads the key from a public setting called VITE_HEYSTACK_WEB_KEY. We haven't confirmed where Lovable wants public settings kept, so ask Lovable how to add one. A browser key is made to be public: it ends up in your published site either way and can only send data to Heystack, never read it.

  4. Turn on session replay (optional). In the console, open Settings › App › Data & privacy, turn on session replay and pick a sample rate. Nothing is recorded until you do. Errors are collected either way.

  5. Publish and check. Publish your app and open it in a browser. Your app's Connect page in the console says First signal received when data arrives, usually within a minute.

Good to know

  • Recording the calls your pages make. Browser request tracing is off by default. To turn it on, add "Turn on browser request tracing (tracing: true)" to the prompt above. Heystack adds its own request header only to calls to your site's own address, so calls to Supabase and other services work as before.
  • Keep testing separate. If you don't want test visits mixed in with real ones, create a second Heystack app for testing and use its key there.
  • Server-side problems stay hidden. An error inside a Supabase function shows up only as the failing call from the page, and only when browser request tracing is on.
  • Your data, your choice. Masking happens in the visitor's browser before anything is uploaded. You can unmask trusted parts of a page, such as navigation, with data-hs-unmask. See Session Replay.