Nexoply

How-to guides

How to add an AI chatbot to your website (any platform, step by step)

Add an AI chatbot to any website: plain HTML, WordPress, Wix, Squarespace, Shopify, Webflow or React. One line before </body>. Free plan, no card needed.

Updated October 6, 2026 8 min read

In short

Create a free Nexoply account, add your business information, and copy the one-line install code from the Chatbot page of your dashboard. Paste it once, just before the closing </body> tag, usually in a site-wide footer area such as a footer code box, a theme's footer file or a shared footer include. That works on any website where you can add a script tag: plain HTML, WordPress, Wix, Squarespace, Shopify, Webflow and JavaScript apps. The assistant answers only from the business information you approved, and the Free plan (50 conversations a month) needs no credit card.

  • One line of code, pasted once before </body>: no plugin to build, no AI key, no developer needed for most sites.
  • Works on any site that accepts a script tag, from a hand-written HTML page to a site builder or a React app.
  • The chatbot answers only from your services, prices, FAQs and policies, and says so when it doesn't know.
  • Changes made in the dashboard reach your site within about a minute, without touching the code again.
  • The widget loads asynchronously, sets no cookies and can't break your site.

Before you start

Adding an AI chatbot to a website has two parts: building the assistant, and placing it on the site. With Nexoply the first part happens in the Nexoply dashboard, without code and without an AI key, because Nexoply runs the AI. The second part is one line of code. You need:

  • A Nexoply account. Sign up free: the Free plan includes 50 conversations a month, with no card needed. Paid plans start at $19 a month on the pricing page.
  • Access to the place where your site accepts custom code: a footer code setting in your site builder, your theme's files, or your HTML templates. On hosted builders, check that your plan allows custom code.
  • About five minutes, plus the time to review your business information.

Step 1: Build the chatbot with your business information

An AI chatbot for a small business website is only as useful as what it knows. In Nexoply you give it your services and prices, FAQs, policies, opening hours and service areas. The quickest way is the website import: enter your site's address and Nexoply reads your public pages (Free 15, Starter 40, Business 100, Pro 200 per scan), including pages built with JavaScript, then suggests services with prices, FAQs, policies, hours and contact details. You review the suggestions; nothing is added until you approve it.

From then on the assistant answers only from that information. It's instructed to say when it doesn't know instead of guessing, and every conversation is in your dashboard to review. Visitors can write in any of 12 languages and get answers in theirs. Nexoply is not a live-chat inbox for human agents, and it doesn't take bookings or payments itself; its buttons can send visitors to your booking page, phone or WhatsApp. See how Nexoply works for the full picture.

Step 2: Copy your install code

Open the Chatbot page in your dashboard (click Create chatbot if you haven't yet) and copy the installation code. It looks like this:

<script src="https://nexoply.com/widget.js" data-chatbot="YOUR-KEY" async></script>

YOUR-KEY is replaced by your chatbot's own key, which the Chatbot page fills in for you. The key is public: it isn't a password and gives no access to your account; it only tells the widget which business it belongs to. To see the assistant before changing your site, click Open a test page with your chatbot.

Step 3: Paste it just before </body>

On a site you edit as HTML files, paste the code on its own line just above the closing </body> tag:

    <!-- …your page content… -->
    <script src="https://nexoply.com/widget.js" data-chatbot="YOUR-KEY" async></script>
  </body>
</html>
  1. Find your shared footer

    If your pages share a footer template or include (common on PHP sites and static site generators), paste the code there once. Otherwise, paste it into each page where the chat button should appear.

  2. Paste once per page

    One copy per page is enough. The script loads asynchronously, so placing it at the end of the page lets your content appear first.

  3. Upload or deploy

    Save the files and upload or deploy them the way you usually update your site.

Site builders and frameworks each have one place for site-wide code. Paste the same line there; the platform guides walk through each one step by step.

PlatformWordPress
Where to paste the codeA header/footer code plugin (e.g. WPCode), Footer box; or your theme's footer.php before </body>
Step-by-step guideWordPress guide
PlatformWix
Where to paste the codeSettings → Custom Code → + Add Custom Code, All pages, Body - end (premium plan with a connected domain)
Step-by-step guideWix guide
PlatformSquarespace
Where to paste the codeSettings → Advanced → Code Injection → Footer (Business plan or higher)
Step-by-step guideSquarespace guide
PlatformShopify
Where to paste the codeOnline Store → Themes → … → Edit code → layout/theme.liquid, just before </body>
Step-by-step guideShopify guide
PlatformWebflow
Where to paste the codeProject settings → Custom code → Footer code, then publish
Step-by-step guideWebflow guide
PlatformReact
Where to paste the codeindex.html before </body>, or a useEffect in the root component
Step-by-step guideReact guide
PlatformNext.js
Where to paste the codenext/script in app/layout.tsx (App Router) or pages/_app.tsx (Pages Router)
Step-by-step guideNext.js guide
PlatformVue and Nuxt
Where to paste the codeindex.html before </body>; in Nuxt, the app head in nuxt.config.ts
Step-by-step guideVue guide
PlatformPlain HTML
Where to paste the codeBefore </body> in each page, or in your shared footer include
Step-by-step guideStep 3 above

Custom-built sites and JavaScript apps

  • No npm package needed. The widget is always the same script tag. It also works when the tag is added from code, as long as it keeps the data-chatbot attribute and a src containing widget.js.
  • Single-page apps. It mounts once on the page, outside your app's root element, keeps the conversation while visitors navigate, and re-checks page rules when the URL changes. Loading it twice is harmless.
  • Server-side rendering. It only runs in the browser and doesn't touch your framework's markup, so there are no hydration issues.
  • Content-Security-Policy. If your site sends one, allow https://nexoply.com in script-src, connect-src and img-src.
  • Testing locally. If you fill in Only allow on these websites, add your local development host with its port (for example localhost:3000), or leave the list empty while testing.

Step 4: Check that it works

Open your live site in a new private window. A chat button appears in the bottom corner. Ask a real question, such as "Do you do emergency call-outs on weekends?" or "Which areas do you cover?" (more examples in the AI chatbot guide for plumbers). Within seconds the conversation shows up under Conversations in your Nexoply dashboard. From then on, changes you make in the dashboard reach your site within about a minute, without editing the code again.

Troubleshooting: the chat button doesn't appear

  • Code not live yet. Make sure the change is saved and published or deployed, then reload the live site in a private window. Editor previews in site builders don't always run custom code.
  • Code changed or incomplete. Check that the line is complete, from <script to </script>, with data-chatbot and your key unchanged.
  • Custom code not allowed. On hosted builders, custom code can depend on your plan (for example Wix needs a premium plan with a connected domain, and Squarespace the Business plan or higher).
  • Allowed domains. If you set Only allow on these websites on the Chatbot page, make sure every address of your site is listed exactly (for example mybusiness.com, or *.mybusiness.com for subdomains).
  • Content-Security-Policy. A strict policy blocks the script until https://nexoply.com is allowed in script-src, connect-src and img-src.
  • Chatbot switched off, or ad blockers. Check that the Chatbot enabled switch is on. Rarely, a browser extension blocks chat widgets; try another browser.

Customize the look, then next steps

The design is set in your Nexoply dashboard, never in your site's code. Under Chatbot → Customize you can choose the message button's icon (or your own image or SVG), text label, shape, size, colours, border, shadow and position, or use a side tab on the edge of the screen (such as "Help") instead. You can set a different look on phones, and use page rules to change or hide the button on chosen pages (for example /services/*). Match the chat window to your fonts and colours, add your logo, or start from a ready-made template. A start screen can show your own buttons, such as Book, Call or WhatsApp. The widget uses a Shadow DOM, so your site's CSS doesn't affect it.

Then review conversations regularly: questions the assistant couldn't answer are listed and can become FAQs in one click, and insights show topics, busiest times and the pages where the chat was opened. For the full list of options, see the chatbot features; to compare tools first, read the best AI chatbots for small business.

Frequently asked questions

How do I add a chatbot to my website?

Create the chatbot in a service such as Nexoply, copy its one-line install code, and paste it once just before </body>, usually in a site-wide footer area. Save or publish, then open your site to see the chat button.

Do I need to know how to code?

No. You build the assistant in the Nexoply dashboard without code. The only technical step is pasting one line into your site, and most site builders have a box for exactly that.

Is there a free AI chatbot for my website?

Nexoply's Free plan is $0 with 50 conversations a month and no credit card. Some site builders only allow custom code on paid plans, so check yours.

Will it work on my website?

If you can add a script tag to your site, yes: plain HTML, WordPress, Wix, Squarespace, Shopify, Webflow, React, Next.js, Vue and other custom-built sites.

Does it slow down my website?

No noticeable effect. The script loads asynchronously, so your page appears first, and it waits until the page is ready. Its code is wrapped so an error can never break your site.

Does it use cookies?

No. It sets no cookies. It stores an anonymous visitor id in localStorage and the current conversation in sessionStorage, so the conversation continues as visitors move between pages.

Can I put it only on some pages?

Yes. Either paste the code only on those pages, or install it site-wide and use page rules in the dashboard to change or hide the button on chosen pages.

Let your website answer the questions for you

Add your business info, test your assistant, and put it on your website – all on the free plan.