Skip to main content
Open Installation in your chatbot’s sidebar. It shows your chatbot ID and ready-to-copy snippets. Everything on this page works on any website; the platform sections below just show where to paste. This adds the floating chat bubble to your site:
Replace YOUR_CHATBOT_ID with your chatbot ID from the Installation page, or just copy the pre-filled snippet there. Paste it into your site’s HTML; inside <head> or before </body> both work, since the loader is asynchronous and does not block your page. The script URL accepts a few options: Combine them like any query string: .../widget/YOUR_CHATBOT_ID.js?hideBubble=true&delay=2000.

Inline embed

To place the chat inside the page (a support page, a help center) instead of floating over it:

iFrame

When you cannot run scripts at all (some site builders and portals), embed the chat page directly:
The iframe shows the full chat experience but cannot offer the floating bubble, SDK control, or tracking events on the host page. Prefer the script when possible.

Platform guides

Use the official plugin; no code needed:
  1. In WordPress admin, go to Plugins → Add New and search for SiteGPT.
  2. Install and activate the plugin.
  3. Open the SiteGPT menu in the WordPress admin sidebar and paste your chatbot ID.
The plugin loads the same widget as the script snippet, so the SDK and tracking events work identically. Prefer a code approach? Paste the script snippet with a plugin like WPCode, or in your theme’s footer.

Restrict where your chatbot can be embedded

By default the widget loads on any website that includes your snippet. If you want to make sure your chatbot cannot be lifted onto a site you don’t control (using up your message quota under someone else’s brand), set Settings → General → Allowed Domains in your dashboard:
  • List domains comma-separated, like example.com, docs.example.com. Each entry also covers all of its subdomains, so example.com already includes www.example.com and shop.example.com.
  • Enforcement happens in the visitor’s browser itself (a frame-ancestors Content-Security-Policy on the chat window), so a copied snippet on an unauthorized site simply renders nothing. On disallowed sites the widget also skips loading and prints a console message naming the domain, so a misconfiguration is easy to spot.
  • Your SiteGPT dashboard preview always keeps working, and leaving the field empty returns the widget to loading anywhere — the default.
This controls where the widget can be embedded. It is not a defense against non-browser scripting of chat APIs; conversation rate limits cover runaway usage.

Hide the widget on specific pages

If your snippet loads site-wide (a global layout, a tag manager) but some pages should not show the chat — checkout flows, pricing pages — set Settings → General → Excluded Pages:
  • List paths like /pricing (that page exactly, trailing slash and letter case do not matter) or /checkout/* (the page and everything under it). Up to 50 entries.
  • On matching pages the floating chat button does not appear and the chat does not auto-open. The widget follows along in single-page apps: navigating onto an excluded page closes an open chat, and navigating off it brings the button (and, on desktop, a previously open conversation) back. The conversation itself is never lost.
  • Chat widgets embedded inline on a page and custom launchers that replace the default bubble (a hideBubble=true or hideButton=true install, like the custom chat trigger) are not affected — where you placed the widget explicitly, your placement wins. On a standard install that keeps the floating bubble, SDK open calls are also declined on excluded pages (the widget logs a note to the browser console).
Unlike Allowed Domains, this is a display preference enforced in the visitor’s browser by the widget script, not a security control.

Verify it works

Open your site in a private browser window. The bubble should appear within a few seconds. Ask a question you know the chatbot can answer.
Check that the snippet is on the page (view the page source and search for sitegpt), and that your chatbot ID matches the Installation page. Content blockers and strict Content-Security-Policy headers can also block the script; allow sitegpt.ai in your CSP if you use one. If you have set Allowed Domains in Settings → General, check the browser console — the widget names the domain it refused to load on.
The snippet must be on every page where you want the chat. Site-wide layouts, theme footers, or a tag manager get it everywhere at once.
The JavaScript SDK opens and closes the widget, sends messages, injects CSS, and identifies logged-in users. The tracking events page covers analytics.