Documentation
Documentation
Everything needed to put an assistant on a website and keep it running well.
Install in one minute
Open the Launch step in the studio, press Copy code and paste it just above the closing </body> tag of every page.
<script
src="https://transputec-bot-studio.vercel.app/api/embed.js"
data-company-id="YOUR-ASSISTANT-ID"
async></script>
That short form is all that is needed; everything else is optional. Then press Check my website: the studio fetches your page and tells you whether the code is there, whether it belongs to this assistant, and whether your security policy would block it.
Settings
Add attributes to the script tag. Invalid values are ignored. Attributes on the tag beat the studio’s settings, which beat the defaults.
| Attribute | Values | What it does |
|---|---|---|
data-company-id | assistant id | Required. Which assistant to show. An unknown or switched-off id shows nothing and breaks nothing. |
data-theme | #rrggbb | Accent colour. Text on it is chosen to stay readable. |
data-position | bottom-right, bottom-left | Which corner. |
data-popup | off, teaser, open | Wait to be clicked, show a small invitation, or open once on exit intent (computers only). |
data-popup-delay | 1–300 seconds | When the invitation appears. |
data-popup-message | text, 140 letters | Your own words for the invitation (plain text only). |
data-launcher-label | text, 32 letters | Words on the button. |
data-launcher-style | full, icon | Picture with words, or just the picture. |
data-offset-x, data-offset-y | 0–200 px | Distance from the edges, to clear a cookie banner or another bubble. |
data-z-index | 1–2147483000 | Stacking order. |
data-open-on-load | true | Open the chat when the page loads (never on a phone; once per visit). |
data-hide-on | paths, comma separated | Hide on these pages and below them, such as /checkout,/cart. |
data-language-hint | en, de, pt-BR | Passed to the chat window. |
data-avatar | https:// address | Replaces the assistant’s picture. |
data-host | https:// address | Which Blimp Studio server the chat comes from. Only needed with a copy of the script kept on your own domain (see below). |
The assistant never invites while someone is typing in a form, never on checkout, cart, payment, login or account pages, at most once per visit, and leaves a visitor alone for a week after they dismiss it.
JavaScript API
window.LucyWidget is available as soon as the script runs. Calls made before the assistant has loaded wait and run when it is ready.
| Call | What it does |
|---|---|
LucyWidget.open(), close(), toggle() | Open or close the chat window. |
LucyWidget.isOpen() | true while the chat window is open. |
LucyWidget.identify({ name, email }) | Pre-fills the email card. Held only in the visitor’s browser tab. |
LucyWidget.setContext('text') | Up to 200 letters about what the visitor is viewing, such as a product name. |
LucyWidget.on('open' | 'close' | 'message', fn) | Listen to events. A message event carries only the role, never the words. Returns a function that removes the listener. |
Pin a version (subresource integrity)
Security scanners flag scripts loaded from another domain without an integrity hash. Released copies of the loader live at /embed/v<N>.js and never change, so you can pin one:
<script
src="https://transputec-bot-studio.vercel.app/embed/v2.js"
integrity="sha384-eWCTVHIt0RbBKVNtNHtngCdZFH2BSr5Kg2DS4KVRsnVsNIJ2t4Wzyp+NMLqP38md"
crossorigin="anonymous"
data-company-id="YOUR-ASSISTANT-ID"
async></script>
Every release and its hash is listed at /api/embed/version. A new release gets a new address; move to it, with its hash, when you choose. The chat window itself stays up to date on our side.
Host the script on your own domain
Download a released file, serve it from your domain, and name the server with data-host. A copy on your own origin needs no integrity attribute:
<script src="/assets/bot.js" data-host="https://transputec-bot-studio.vercel.app" data-company-id="YOUR-ASSISTANT-ID" async></script>
Security policy (CSP)
If your site sends a Content-Security-Policy, allow the Blimp Studio address (here https://transputec-bot-studio.vercel.app) for: script-src (the loader), connect-src (settings and chat requests), frame-src (the chat window) and img-src (pictures). “Check my website” in the Launch step reports what your policy blocks.
Platform guides
- Any website: paste the code just above
</body>on every page. - WordPress: use a header and footer plugin such as WPCode and paste the code into the footer box, or add it to your theme’s footer. With WP Rocket, exclude the script from minification and combination.
- Shopify: Online Store → Themes → Edit code →
theme.liquid, paste above</body>. - Wix: Settings → Custom code → Add code, place it in Body – end on all pages.
- Squarespace: Settings → Advanced → Code injection → Footer.
- Webflow: Project settings → Custom code → Footer code.
- Google Tag Manager: a Custom HTML tag firing on all pages.
Leads and webhooks
Leads appear in the studio’s Leads page as soon as they are submitted. To send each new lead to another system, add a webhook in Integrations. Each new lead is posted as JSON with the event lead.created, the company name and the lead’s details (without the full transcript). Team email notifications are sent when an email service is connected to your account.
Terms notice
Before a visitor’s first message, a short notice asks them to accept your terms and privacy notice. It is on by default; set your own links or turn it off in the Style step. The time of acceptance is saved with any lead.
Troubleshooting
- Nothing appears: is the assistant switched on? Run Check my website. Look for blocked requests to the Blimp Studio address in your browser’s console.
- Button appears late: a “delay JavaScript” setting holds scripts until the first scroll or tap. That is expected.
- Integrity error in the console: the file at the address no longer matches the hash. Pin a released
/embed/v<N>.jsfile and its hash from/api/embed/version. - Still stuck? Contact support.