Skip to content

Website widget

The website widget guide covers setup. This page is the technical reference.

<script src="https://api.backcrew.ai/v1/widget.js" data-widget-key="wk_…" async></script>

Load it once per page, just before </body> or in your site’s shared layout.

Platform Where to paste it
Plain HTML Before </body> on each page
WordPress A header/footer code plugin, or your theme’s footer.php
Shopify Online Store → Themes → Edit code → theme.liquid, before </body>
Webflow, Wix, Squarespace The site-wide custom code setting, in the footer
Google Tag Manager A Custom HTML tag on All Pages
React, Next.js, Vue The root HTML template, or your framework’s script component

Every request is checked against the sites you listed: the browser’s Origin header must match, or the request is refused - even with a valid key.

You enter It allows
shop.example.com https://shop.example.com only
*.example.com Any subdomain of example.com, not the bare domain
http://localhost:8080 Local testing - scheme and port must match exactly

Paths are not allowed: the widget works on every page of an allowed site.

Save a file with the snippet as index.html, serve the folder with python3 -m http.server 8080, add http://localhost:8080 to the allowed sites and open that address. A page opened straight from disk (file://) is always refused.

Problem Fix
No bubble appears Open the browser console: a line starting [backcrew] says why - site not allowed, chat off, or wrong key.
Works on www but not the bare domain They’re different sites - list both.
“This assistant isn’t available right now” The agent isn’t deployed, or the workspace is out of credits.
“Too many requests” The widget answers up to 30 messages a minute across all visitors.