How to Add Live Chat to a SaaS With One Script
When you build a product alone, the fastest way to learn what is broken is to let users tell you while they are on the page. A chat bubble does that better than a contact form or a support email buried in the footer. The problem is that most chat tools are built for support teams: seats, routing rules, macros and a price to match.
This guide covers what a solo founder actually needs from live chat, how to add it with one script tag, and how to keep it from eating your day.
What a small product needs from chat
Strip a helpdesk down to what matters for one person and you get a short list:
- A bubble on every page that visitors can open without leaving what they were doing.
- Real-time replies when you are online, so a confused visitor gets an answer in minutes, not days.
- A fallback when you are not, so the conversation does not die when the visitor closes the tab.
- Context with every message: which page, which browser, which device, and who the user is if they are signed in.
- One inbox, especially if you run more than one app.
Everything else, from ticket assignment to SLA timers, can wait until you hire someone.
Install: one line before the closing head tag
With Indiehacker Studio, the install is a single tag:
<script src="https://indiehacker.studio/s.js" defer></script>
There is no key in the snippet. The project is matched by the domain the request comes from, and data is only accepted once you verify that domain with a DNS TXT record, a meta tag or a one-time verify link. Because the script loads with defer, it never blocks your page, and the chat panel itself only loads when a visitor opens the bubble.
The same line goes on every app you run. Each one shows up as its own project in the same dashboard.
Tell the chat who is signed in
Anonymous chats are fine for a landing page. Inside your app, you want to know which user is writing. Call identify once you know who they are:
window.ihs?.identify({ id: "user_123", email: "ana@example.com", name: "Ana" })
Conversations then show the user’s name and email instead of an anonymous visitor, together with their current page, country, device and past conversations. Treat this data as coming from the browser: it is whatever your page sends, so use it for context, not for authorization.
Three tabs, three kinds of message
Not every message is a support question. Splitting the bubble into tabs gives you cleaner signal:
- Support becomes a live chat thread.
- Feedback is a short message with an optional rating and a category, such as an idea or a problem.
- Report a bug takes a message plus attachments: a screenshot of the page, a short screen recording, or files. The report carries the URL, browser, OS and viewport automatically, and can include recent console errors if you turn that on.
Bug reports with a recording and the console errors attached save you the “which browser are you on?” round trip that usually costs a day.
You can turn tabs off per project. A marketing site might only need feedback; the app itself might need all three.
Answering in real time
When a visitor writes, the conversation appears in your inbox immediately. Reply from the dashboard and the visitor sees it in the bubble right away, with a typing indicator while you write and a seen mark once they have read it. New conversations also reach you by email and, with the dashboard open, as a browser notification.
A few habits keep live chat sustainable:
- Answer the first message fast, even if the fix takes longer. “Thanks, I can reproduce it, fixing now” buys you hours.
- Close threads when they are done. An inbox of open, pending and closed conversations is only useful if the status means something.
- Turn repeated questions into product changes. If three people ask where the export button is, the button is in the wrong place.
When you are offline
You will not always be at your desk. If you have not replied after a few minutes, the bubble asks the visitor for an email. When you answer later and they have not seen it in the bubble, the reply goes to their inbox instead. The wait time is a setting per project.
This is the difference between a chat that looks broken at night and one that quietly becomes email.
Keeping spam out
Any public form attracts spam, and a chat bubble is a public form. Sensible defaults go a long way: a hidden honeypot field, a minimum time on the page before the first message, caps on how many messages one visitor can send, and rate limits per site and per IP. For noisier sites, a challenge such as Cloudflare Turnstile on the first message stops most bots without bothering real users.
Make it look like yours
The bubble should feel like part of your product. Pick the corner, the offset from the edge, the color, the icon, a greeting line and light, dark or automatic theme. Preview the result before you save, so you are not testing in production.
Add it to your app
Indiehacker Studio gives you the chat bubble, feedback and bug reports, plus cookieless analytics and Stripe revenue, from one script tag across every project you run. Start free and have the bubble live on your site in a couple of minutes.