Wix

Install AskThe.bot on Wix with the marketplace app, or use custom code for advanced placement.

Easy install

Use the AskThe.bot Wix app when available. It injects site-wide chat and Wix Stores product-page try-on from the connected Wix dashboard, using the same agent styling values as the rest of AskThe.bot.

Manual install requirements

  • A Premium plan (free Wix sites can't run custom code).
  • Your domain connected (the agent's allowed-domains check uses the visible domain).

1. Site-wide chat bubble

  1. Wix dashboard → Settings → Custom Code.
  2. + Add Custom Code. Paste:
<script async src="https://askthe.bot/embed.js" data-agent="YOUR-SLUG"></script>
  1. Name: askthe.bot chat. Add to: All pages. Place in: Body — end. Save.

2. Try-on on Wix Stores product pages

Wix's product page is a managed widget — you can't drop raw HTMLinside the buy box. Two options:

Option A: Floating "Try it on" button (easiest)

Use the auto button mode. It floats and is product-aware via the script tag:

<script async src="https://askthe.bot/tryon.js"
  data-agent="YOUR-SLUG"
  data-product-image="https://yoursite.com/path-to-default.jpg"
  data-product-label="Featured product"></script>

Add this in Custom Code scoped to Choose specific pages → Product pages. The same instance handles every PDP; the modal asks the customer to confirm the product visually.

Option B: Velo (per-product image)

Enable Velo, then in the product page code:

import wixLocation from 'wix-location';
import { currentProduct } from 'wix-stores-frontend';

$w.onReady(async () => {
  const p = await currentProduct.getProduct();
  $w('#tryOnButton').onClick(() => {
    $w('#tryOnHtml').postMessage({
      type: 'open',
      productImage: p.mainMedia,
      productLabel: p.name,
      productUrl: wixLocation.url,
    });
  });
});

And in an HTML embed element #tryOnHtml:

<script async src="https://askthe.bot/tryon.js"
  data-agent="YOUR-SLUG" data-auto-button="false"></script>
<script>
  window.addEventListener('message', function (e) {
    if (e.data && e.data.type === 'open' && window.AskTheBotTryOn) {
        window.AskTheBotTryOn.open(e.data);
    }
  });
</script>

Advanced configuration

The Wix dashboard writes the same agent styling values used by the regular askthe.bot embed and try-on scripts. Wix adapts those values into script attributes when it injects chat and try-on on your site.

Styling keys

KeyUsed byDescription
accent_colorChat + try-onPrimary brand color. The chat embed reads it from saved styling; Wix still passes it as data-color to /tryon.js for product-page buttons.
welcomeMessageChatEmpty-state message shown before a visitor sends their first chat message.
tryon_labelTry-onText for the try-on button and modal title. Wix passes this as data-label.
positionChatChat bubble corner: bottom-right, bottom-left, top-right, or top-left. Wix maps this to the left/right script position.
tryonPositionWix Stores try-onWhere Wix anchors the automatic try-on button on the product image: top-left, top-center, top-right, bottom-left, bottom-center, or bottom-right.
surfaceWixWhether Wix injects chat, tryon, or both.

Custom try-on buttons

If you add your own button with data-askthebot-tryon-trigger, Wix will skip the automatic product-image button and bind your button to the try-on modal instead. For the generic trigger attributes and JavaScript API, see try-on install modes, script attributes, and JavaScript API.

<button
  data-askthebot-tryon-trigger
  data-product-image="https://example.com/product.jpg"
  data-product-label="Black linen jacket"
  data-product-url="https://example.com/products/black-linen-jacket">
  See it on me
</button>

The data-product-* attributes are optional on Wix Stores product pages. If omitted, the Wix adapter tries to detect the current product image and title from the page.

Custom chat buttons

If you add an element with data-askthebot-chat-trigger, the chat script uses that element as the opener instead of drawing the default floating bubble.

<button data-askthebot-chat-trigger>
  Ask us a question
</button>

Troubleshooting

  • Code not running: Custom Code requires Premium + connected domain. Editor preview won't show it.
  • "Domain not allowed": add your connected domain in agent Profile → Allowed domains. wixsite.com subdomains will be blocked unless explicitly allowed.

Back to embed · try-on.