Requirements
- Business plan or above — Personal plans don't have Code Injection.
1. Site-wide chat bubble
- Site dashboard → Settings → Advanced → Code Injection.
- Paste into the Footer field:
<script async src="https://askthe.bot/embed.js" data-agent="YOUR-SLUG"></script>2. Try-on button on a product page
Squarespace doesn't expose product image variables in templates the way Shopify does. Two practical paths:
Option A: Per-product Code Block
- Open a product → Edit → Additional Info → + Code.
- Paste:
<button type="button" id="atb-tryon"
style="display:block;width:100%;padding:12px;margin-top:12px;
border:none;border-radius:6px;background:#111;color:#fff;
font-weight:600;cursor:pointer;">
Try it on
</button>
<script async src="https://askthe.bot/tryon.js"
data-agent="YOUR-SLUG" data-auto-button="false"></script>
<script>
document.getElementById('atb-tryon').addEventListener('click', function () {
window.AskTheBotTryOn && window.AskTheBotTryOn.open({
productImage: 'https://yoursite.com/path-to-this-product.jpg',
productLabel: 'Red floral midi dress',
});
});
</script>Option B: Floating button on all product pages
Settings → Advanced → Code Injection → Footer:
<script>
if (location.pathname.indexOf('/shop/') === 0) {
var s = document.createElement('script');
s.async = true;
s.src = 'https://askthe.bot/tryon.js';
s.setAttribute('data-agent', 'YOUR-SLUG');
document.body.appendChild(s);
}
</script>The floating button appears on every /shop/... page. Customers upload a photo and the modal asks them to confirm the product.
Troubleshooting
- Personal plan: Code Injection isn't available — upgrade to Business or higher.
- Editor doesn't render: Code Injection only runs on the live site, not in the editor preview.
- "Domain not allowed": add your custom domain in agent Profile → Allowed domains.