Add chat to an HTML, React or Next.js site
For hand-built sites: paste one script tag before the closing body tag, or load it with next/script in Next.js. It never blocks your page from rendering.
- About 5 minutes
- Comfortable with website settings
- For: Developers, or owners who edit their own site's code
7 steps in this guide
Before you start, have these ready
- Access to your site's code and a way to deploy it
- The website chat add-on, $29 a month on any plan. Email hello@solvetrend.com to add it.
- Your line switched on: the Receptionist page says "Answering calls." Chat only answers once it is.
Step 1: Copy your chat code
Sign in, open Settings, and find the Website chat panel. Select the whole line of code in the grey box and copy it. It is one line, and it already contains your account ID.
It looks like this
<script src="https://getringhero.com/widget.js" data-org="YOUR_ORG_ID" async></script>

What you should see
One line that starts with <script and ends with </script>, with your account ID after data-org=.
Step 2: Plain HTML: paste it before the closing body tag
In your page template, or in every page if there is no template, paste the line just above </body>. The async attribute means it downloads in parallel and never holds up the page.
Step 3: React with Vite: use index.html
Paste the same line just above </body> in index.html at the root of the project. There is nothing to import.
Step 4: Next.js: load it with next/script
In app/layout.tsx, import Script from next/script and add it inside <body>. lazyOnload waits until the page is idle, which suits a chat button. data- attributes are passed through as written.
app/layout.tsx
import Script from "next/script"; <Script src="https://getringhero.com/widget.js" data-org="YOUR_ORG_ID" strategy="lazyOnload" />Step 5: Options, if you want them
data-color="#rrggbb" uses your brand colour. data-theme="light" or "dark" fixes the chat theme. data-mode="inline" puts the chat in the page where the tag is, and adding data-target="#chat" puts it in the element you name instead.
Any link to #ringhero-chat opens the chat, and window.Ringhero.open() does the same from your own code. Questions: hello@solvetrend.com.
Step 6: Check it on your live site
Open your website in a new private or incognito window, so you see what a visitor sees. Try it on your phone too.
No button?
Make sure the change is published, then refresh the page. If your site has a cookie banner or a cache plugin, clear the cache and look again.
What you should see
A green button labelled "Chat" in the bottom right corner of your website. Click it and a chat panel opens above the button, which now says "Close".
Step 7: Ask it a real question
Ask about your hours and about a price from your price list. Then ask for something you have not told it.
What you should see
Answers that match your Receptionist settings. For anything missing, it says the team will confirm and offers to take a name and number.
If a screen is named a little differently from what you see, the steps still apply in the same order. Tell us at hello@solvetrend.com and we will fix the guide.