Embed your bot on your Shopify storefront by adding a small snippet to your theme. Access the code by navigating to the Share tab in your bot's dashboard and selecting the Shopify option under the CMS category, then choosing an embed type.
Add the Snippet to Your Theme
- On your Shopify dashboard, go to the Themes page
- On your current theme, click Actions > Edit code
- Open the Layout > theme.liquid file
- Paste the embed code for your preferred embed type just before the closing
</body>tag
Embed Types
Bubble
Floating chat button on every page of your store:
<script type="module">
import Bot from "https://cdn.jsdelivr.net/npm/@inditeai/js@0/dist/web.js";
Bot.initBubble({
bot: "my-bot",
});
</script>Popup
Overlay window, optionally opening automatically after a delay:
<script type="module">
import Bot from "https://cdn.jsdelivr.net/npm/@inditeai/js@0/dist/web.js";
Bot.initPopup({
bot: "my-bot",
autoShowDelay: 3000,
});
</script>Standard
Inline container — also add the <bot-standard> element where the bot should render (for example in a page or section template):
<script type="module">
import Bot from "https://cdn.jsdelivr.net/npm/@inditeai/js@0/dist/web.js";
Bot.initStandard({
bot: "my-bot",
});
</script>
<bot-standard style="width: 100%; height: 600px;"></bot-standard>Ensure the bot parameter matches your bot's unique ID, available in the Share tab. For all configuration options, see the HTML & JavaScript guide.