Skip to main content
HTML

Add an AI Chatbot to an HTML Website

The baseline install: two CDN tags and a mount call, pasted before the closing body tag. No build step, no framework, no server.

Priced in your local currency
Works on static hosting

How it works

If you can edit the HTML file, you can finish this in about five minutes.

01

Create the chatbot

Sign in, upload a document or add a website page, and finish the create wizard. Wait until the first source finishes processing.

02

Copy the embed code

Open the chatbot in the Chatbots area and copy its embed code. It already carries your chatbot key, so nothing else needs configuring.

03

Paste before the closing body tag

Open your HTML file and paste the snippet immediately above the closing body tag. Repeat on every page you want the widget on, or use a shared include.

04

Upload and test

Upload the file to your host and open the page. Ask a question your uploaded source answers to confirm the key and the sources are wired up.

The snippet

Paste this immediately before the closing body tag of your page.

html
<link rel="stylesheet" href="https://cdn.cortexvia.in/chatbotsdk-web.css" />
<script src="https://cdn.cortexvia.in/chatbotsdk-web.iife.js"></script>
<div id="cv-chat"></div>
<script>
  window.ChatbotSDK.mount("#cv-chat", {
    chatbotKey: "ctx-cb-xxxxxxxxxxxxxxxx",
    config: {
      mode: "chatbot",
      position: "bottom-right"
    }
  });
</script>

Replace the placeholder key with the one from your Chatbots area. Everything else can stay as it is.

  • Before the closing body tag, not in the head
  • The container element must appear before the script that mounts into it
  • mode chatbot is the floating launcher, mode chat is an inline panel

Matching your site

Every value below exists in the shipped config, so you can brand the widget without writing CSS.

html
<script>
  window.ChatbotSDK.mount("#cv-chat", {
    chatbotKey: "ctx-cb-xxxxxxxxxxxxxxxx",
    config: {
      mode: "chatbot",
      title: "Support Assistant",
      inputPlaceholder: "Ask anything...",
      position: "bottom-right",
      styleOverrides: {
        widget: {
          launcher: { backgroundColor: "#111827" },
          wrapper: { zIndex: 9999 }
        },
        layout: {
          header: { backgroundColor: "#111827" }
        },
        userMessage: {
          bubble: { backgroundColor: "#111827", color: "#ffffff" }
        }
      }
    }
  });
</script>

Style overrides take ordinary CSS property objects per region of the widget, so the launcher, header, and message bubbles can follow your palette.

  • title and inputPlaceholder set the copy your visitors read
  • position accepts bottom-right or bottom-left
  • The full list of keys is in the embed config reference

Why Cortexvia

A script embed with local currency pricing, with the trust pages published up front.

01

No build step

Two tags and a mount call. Nothing to compile, no package manager, no framework, which is exactly why this works on the oldest sites.

02

Two requests, both cached

One stylesheet and one script from the CDN, so repeat visitors get them from cache rather than re-downloading the widget.

03

Does not touch your markup

The widget renders inside the container you point it at, so your existing CSS and layout are left alone.

04

Local pricing, free tier to test

Plans are priced in your local currency, and the free tier is enough to put one chatbot on a live page.

Questions

What people ask before pasting a script into a hand-written site.

More platforms

The same snippet works anywhere a script tag can go. Pick your platform for the exact steps.

01WordPressWPCode, footer.php, or a block-theme footer pattern.
02Shopifytheme.liquid, before the closing body tag.
03WixCustom Code, added to Body end. Needs a published site.
04SquarespaceCode Injection, Footer. Needs a Business plan or higher.
05WebflowSite Settings, Custom Code, Footer Code, then republish.
06ReactMount in an effect, unmount in the cleanup.
07Next.jsnext/script with afterInteractive, App or Pages Router.
08Plain HTMLPaste before the closing body tag. The baseline.

Get started

Start on the free tier with a document or two, copy the snippet, and paste it before the closing body tag.

One snippet, one paste, done. This is the shortest path from nothing to a working chatbot on a live page.