How to embed a chatbot on any website
· 4 min read
Adding a chatbot to a site should take minutes, not a developer sprint. The pattern is the same everywhere: prepare the content the bot will answer from, copy one script tag, and paste it where your site lets you add custom code.
Step 1: decide what the bot should know
A chatbot is only as good as its sources. Start with your own website pages, then add the documents people ask about: a brochure, a price list, a rulebook. Keep to material you are happy for visitors to see.
With NochBot you crawl the website from the dashboard and upload PDF, CSV or Excel files. The chatbot answers from those sources and nothing else.
Step 2: copy the script tag
The dashboard gives you a single script tag for your account. It loads the chat widget on whichever page it appears.
Step 3: paste it where your site allows custom code
Where the tag goes depends on how your site is built:
- Plain HTML: paste it just before the closing body tag on each page, or in a shared footer file.
- WordPress: use a header and footer scripts plugin, or your theme's footer file.
- Website builders: look for "custom code", "embed" or "footer scripts" in the site settings.
- React or Next.js: add it once in the root layout so it loads on every page.
Step 4: test before telling anyone
Open the page in a private window, ask five questions your visitors really ask, and check each answer against your source. If an answer is wrong, the fix is almost always in the source: add the missing page or document and re-crawl.
Check it on a phone too. The widget should open without covering the content you need to read.
