The script snippet (recommended)
This adds the floating chat bubble to your site: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:Platform guides
- WordPress
- Shopify
- Squarespace
- Wix
- Webflow
- Framer
Use the official plugin; no code needed:
- In WordPress admin, go to Plugins → Add New and search for SiteGPT.
- Install and activate the plugin.
- Open the SiteGPT menu in the WordPress admin sidebar and paste your chatbot ID.
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, soexample.comalready includeswww.example.comandshop.example.com. - Enforcement happens in the visitor’s browser itself (a
frame-ancestorsContent-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.
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=trueorhideButton=trueinstall, 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, SDKopencalls are also declined on excluded pages (the widget logs a note to the browser console).
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.The bubble does not appear
The bubble does not appear
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.It appears on some pages but not others
It appears on some pages but not others
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.
I want to control it from my own code
I want to control it from my own code
The JavaScript SDK opens and closes the widget,
sends messages, injects CSS, and identifies logged-in users. The
tracking events page covers analytics.