Integration guide

How to Integrate an AI Chatbot in Your Website: 4 Levels

To integrate an AI chatbot in your website, add the chatbot's script to your site, give the AI your content, and test its answers. That is enough for most websites. If visitors also ask about stock or their own orders, connect live data next, and then link the chatbot to your other systems.

So chatbot website integration has four levels. Each level answers a harder kind of question. Stop at the level your visitors need.

"Integrate" can mean two different jobs. A shop owner often means "make the chat appear on my site". A developer often means "make the chat read our order system". Both are correct, and they differ a lot in effort. This guide separates them, so you can see what each level needs and who does the work.

LevelA question it can answerAsyntai plan
1. On the pageNone yet. The chat window appears on your site.All plans
2. Your content"What is your return policy?"All plans. Some sources need a paid plan.
3. Live and personal data"Is this in stock in size 42?" or "When does my plan renew?"Standard and above
4. Your other systemsNone directly. Leads and messages reach your other tools.Mostly Starter and above

Level 1: put the chatbot on the page

The technical part of a website chatbot integration is one script. It loads asynchronously and takes one value, your widget ID.

<script>(function(){var l=function(){var s=document.createElement("script");s.src="https://widget.asyntai.com/static/js/chat-widget.js";s.async=true;s.setAttribute("data-asyntai-id","YOUR_WIDGET_ID");document.head.appendChild(s)};if(document.readyState==="complete"){l()}else{window.addEventListener("load",l)}})();</script>

Replace YOUR_WIDGET_ID by copying your own code from the dashboard. If your site sends a Content Security Policy header, allow widget.asyntai.com, asyntai.com and flagcdn.com.

Where the script goes depends on how your site is built:

Website builders

Use the custom code field: Custom Code on Wix, Code Injection on Squarespace, Footer Code on Webflow.

WordPress and Shopify

Use the Asyntai WordPress plugin or the Shopify app. You can also paste the script into WPCode or theme.liquid.

React and Angular

Paste the script before </body> in public/index.html for React, or src/index.html for Angular.

Next.js, Nuxt, Astro

Use pages/_document.js or the next/script component, head.script in nuxt.config.js, or src/layouts/Layout.astro.

Other stacks

Put it in your base layout or shared footer. The HTML guide covers includes and static generators. Headless setups such as Contentful and Strapi have their own guides.

Developers can also control the chat from their own code. The script exposes window.AsyntaiWidget, with open(), close() and toggle(), and initialized is true when the widget is ready. So a "Talk to us" button in your navigation takes one line:

<button onclick="window.AsyntaiWidget.open()">Talk to us</button>

Colours, position and auto-trigger are dashboard settings, so they are not in the script. See Customization. To keep the chat off certain pages, use Exclude Pages and enter the full URLs.

Level 2: give the AI your content

This level decides the quality of the answers. A chatbot on your page knows nothing about your business until you give it your content. With Asyntai you have these sources, and you can combine them:

  • Website crawl: the crawler reads your pages. The limit is 50 pages on Free, 250 on Starter, 1,000 on Standard and 5,000 on Pro.
  • Files and text: add PDFs, documents and spreadsheets to the knowledge base.
  • FAQs: for questions that need one exact answer, such as a refund period.
  • Pages behind a login: from Starter, the crawler can sign in with credentials that you provide. Use this only if all users of that chatbot may see those pages.
  • A direct connection: Connect Your Website, on Standard and above, reads your platform with a read-only key instead of crawling from outside. Shopify, WooCommerce, BigCommerce, Magento, WordPress, Joomla and Moodle can be read this way.

Then write your AI instructions: your tone, the topics to stay on, and what to do when a visitor wants something the chatbot cannot do. "Send billing disputes to [email protected]" is a useful rule. "Be helpful" tells the AI very little.

Test before you install anything. The Test Chat on your Setup tab behaves like the live widget. Its messages do not use your quota and do not go into your chat logs. Ask what customers really ask, in their words: "my parcel never came, what now" is a better test than "shipping policy".

Level 3: connect live and personal data

Your knowledge base is a stored copy. It suits a return policy, but not today's stock. Also, it is shared by everyone who uses that chatbot, so one customer's order details do not belong there. Choose by what the data is:

Your dataUse thisWhat your developer does
Stock, prices, availabilityReal-Time Data Feed on Standard, up to about 500 items. Real-Time Data Feed Max on Pro, up to about 25,000 items.Provide a URL that returns JSON, CSV or plain text
Details of the signed-in userUser Context on Standard and above, up to 2,000 characters per user, or 10,000 on Pro.Pass the data from your site after your own login check
Large or live per-user dataCustom Tools on Standard and above. The AI calls your endpoint during the chat.Build and maintain the endpoint
Different content per customer groupA separate chatbot for each group, each with its own knowledge base. An account has 1, 2, 3 or 20 by plan.Load the matching widget for each user

When you pass user data, send only what the answer needs. A plan name or membership type is often enough. The content access guide explains each option in more detail.

Level 4: link the chatbot to your other systems

At this level, the chatbot passes work to your other tools and your team.

  • Your team: from Standard, Escalation emails you when a visitor asks for a person. Human Takeover lets you reply in the same chat.
  • Your CRM: leads start on Starter. The HubSpot integration creates contacts from captured leads. For another CRM, export a CSV or read GET /leads/ from the API.
  • Other channels: from Starter, connect Instagram, Messenger, WhatsApp and Discord. These connections and Zapier carry messages.
  • Your own interface: from Starter, the REST API at https://asyntai.com/api/v1/ lets your own app send a message to POST /chat/ and show the answer.

A sensible order of work

First

Add your content and test it in the Test Chat. Fix wrong answers with FAQs and instructions.

Next

Install the script. Check it on a live page, in a private window and on a real phone.

Then

Read your chat logs. Add levels 3 and 4 only for questions that visitors really ask.

Your chat logs, on all plans, show what to build next. If people often ask where their order is, User Context is worth the developer time. If nobody asks, you can leave it out. Chat analytics from Starter and Knowledge Gaps from Standard help you find the patterns.

Integration checks for developers

  1. Load order: if a button can be clicked early, check window.AsyntaiWidget.initialized before you call open().
  2. Security headers: test with your real Content Security Policy and not only on a local build.
  3. Page speed: run Lighthouse on the same page before and after, on your own stack, and compare the results.
  4. Overlap: check the chat against sticky menus, cookie banners and add-to-cart bars on small screens. Set a custom position if needed, on Starter and above.
  5. Local tests: serve your page over HTTP or HTTPS. The widget does not run on a file opened directly from disk.
  6. Blocking tools: make sure that your firewall rules and script optimisers do not block or delay the widget hosts.

Frequently asked questions

Do I need the API to integrate a chatbot?

No. The script and your content cover most websites. Use the API when you build your own chat interface or need to read leads from your own systems.

Can a non-developer do this?

Levels 1 and 2 need no programming on most platforms. You paste a script, or install a plugin or app, and then add your content. Level 3 normally needs a developer. Level 4 ranges from a HubSpot connection in the dashboard to your own API work.

Which plan does an AI chatbot integration need?

Levels 1 and 2 work on the Free plan, with 50 messages a month. Starter at $39 has 800 messages and adds leads, the API and other channels. Standard at $139 has 15,000 messages and adds live data and human handover. Pro at $449 has 50,000. See pricing.

What happens to the integration when my content changes?

Run the crawl again after you publish pages that the chatbot should know. With Connect Your Website, content is read again on a schedule. A Real-Time Data Feed is read when the AI needs it.

Start with levels 1 and 2 on the Free plan

Add your website, test the answers in the Test Chat, and install the script when you like the result. The Free plan includes 50 messages a month.

Start free

Explore Our Solutions

Find the right AI chatbot for your platform and use case.

Blog in other languages: Deutsch Français Português