Built your site by hand or with a JavaScript framework? The chatbot is a single deferred script tag. Here’s how to add it to plain HTML, React (Vite/CRA) and Next.js.
Before you start
- You need: Access to your site’s code or a developer who can deploy a one-line change.
- Time: about 2–5 minutes
- Your snippet: included in your setup email from StartupLime (it contains your unique bot ID)
<script src="https://chat.startuplime.com/widget.js" data-bot="YOUR-BOT-ID" defer></script>Your setup email contains the snippet with your real bot ID. Prefer not to touch code? We install it for free.
How to add the chatbot to Custom HTML
- Plain HTML or PHP: paste the snippet just before
</body>in your shared footer or every page template. - React (Vite or Create React App): paste it before
</body>inindex.html(Vite) orpublic/index.html(CRA). - Next.js (App Router): in
app/layout.tsxadd<Script src="…" data-bot="…" strategy="lazyOnload" />fromnext/scriptinside<body>. - Static site generators (Hugo, Jekyll, Astro, Eleventy): add it to your base layout before
</body>. - Deploy, then test on the live site.
Tips for Custom HTML
- Single-page apps: the widget persists across client-side route changes; no re-initialization needed.
- Content Security Policy: allow the chatbot’s script and API domains (we send the exact list).
- Use a
data-chat-openattribute on any element to open the chat from your own buttons.
Prefer not to touch code?We install your chatbot on Custom HTML for free on every plan.
See plansCustom HTML chatbot FAQ
Is there an npm package?
Not needed. The script tag works in any framework and keeps your bundle size unchanged.
Does it work with server-side rendering?
Yes. The script runs only in the browser after the page loads.
Can I control it with JavaScript?
Yes. Any element with the data-chat-open attribute opens the chat; we can share more options on request.
Do I need to rebuild my Custom HTML site?
No. The chatbot sits on top of your existing site. Nothing about your design, pages or SEO changes.