One script tag. Live chat on your website.

Drop a single line on your public website. Every visitor message lands in your CodeB inbox. Reply live from the same console you use for calls and email. Sovereign, origin-scoped, GDPR-clean.

One-line embed Origin-scoped CORS No visitor sign-up GDPR-friendly Offline-safe
1

Enable the widget on your tenant

Open your CodeB admin console, go to Chat Channels, and enable the Simulator inbox (or whichever channel you already use).

In the same page, open the Website widget panel and add each origin you want the widget to run on. Origins are exact-match, one per line. Example:

https://www.some-customer.com
https://staging.some-customer.com
https://blog.some-customer.com
Why exact match? Wildcards on the origin allow-list would turn any subdomain into an authorised broadcast source. We fail-closed on purpose.
2

Paste the script tag on your website

Drop this one line just before the closing </body> tag of your website template. Replace tenant.example.com with your actual CodeB tenant domain.

<script src="https://tenant.example.com/chat-with-us-widget.js"
        data-tenant="tenant.example.com"
        data-channel="simulator"
        data-title="Chat with us"
        data-position="bottom-right"
        data-accent-color="#7dd3fc"
        data-greeting="Hi! How can we help?"
        async></script>
What loads: a single ~21 kB JavaScript file. No fonts, no images, no external CDN, no analytics beacons. All styles are scoped inside #codeb-chat-widget so nothing leaks into your site's CSS.
3

Reply from chat-channels.html

Open your tenant's chat-channels.html admin page. New visitor threads appear on the left as they arrive, sorted newest first. Click one, type a reply, hit Enter. The visitor sees your reply within two seconds without reloading the page.

Threads persist under App_Data/<tenant>/xmpp-channels/simulator/threads/. Everything is on your own IIS server — no third-party inbox.

4

See it live

The bubble looks like this in the bottom-right corner of a page:

Mock preview — the real widget is fully interactive.

Your website content here

Attributes you can customise on the script tag:

  • data-tenant — your CodeB tenant domain (required).
  • data-channel — inbox to route into (defaults to simulator).
  • data-title — header text (default Chat with us).
  • data-positionbottom-right or bottom-left.
  • data-accent-color — hex colour for bubble + buttons.
  • data-greeting — the first message the assistant shows.
  • data-brand — footer credit (default Powered by CodeB).

Frequently asked

Does the visitor need to sign up?

No. The widget creates a per-visitor anonymous session backed by a signed HttpOnly cookie. The tenant's origin allow-list is the trust boundary — the tenant already owns their own domain, so an origin-approved widget is an authorised broadcast source on the tenant's behalf.

Where do visitor messages go?

Straight into App_Data/<tenant>/xmpp-channels/simulator/threads/ on your tenant's IIS server. You read and reply from chat-channels.html. Nothing is uploaded to any shared cloud service.

Is it GDPR-clean?

Yes. The widget runs on the tenant's own IIS server, the session cookie is scoped to the tenant's own domain, no third-party trackers, no analytics beacons, no external CDN fetches. Visitor IP and user-agent stay inside the tenant's App_Data folder.

What if the tenant is offline?

The widget shows a friendly offline banner and still accepts messages — they queue in the tenant's inbox so staff can reply as soon as they're back. Combine with the Email channel to forward transcripts to a shared team inbox.

How does it deal with cross-origin cookies?

The session cookie is set with SameSite=None; Secure; HttpOnly, which is the standard mode for third-party iframes and cross-origin fetch. The tenant domain must serve the widget over HTTPS (which every CodeB tenant does — we auto-provision ACME certificates).

How much does it cost?

Free during the current preview. When metering lands, we charge per active visitor thread per month; the first 100 threads on every tenant are always free.

Can I embed it on multiple sites?

Yes. Add every origin to the tenant's allow-list. Each visitor still gets their own thread, and the referring origin is recorded so you can see which website they came from.

Can I fully customise the appearance?

Yes. The data-* attributes cover the common cases (colour, position, title, greeting). All styles are scoped inside a top-level #codeb-chat-widget container with all: revert, so no host-page CSS leaks in and none of the widget's CSS leaks out. Deeper customisation is a fork of the JS file — the source is small and readable.