Embed an Assistant in Shopify
Shopify works just like a plain website — you add the same three snippets to your theme, right before the closing </body> tag.
Steps
- In Shopify admin, open Online Store → Themes.
- On your theme, choose Actions → Edit code.
- Open Layout/theme.liquid.
- Just before
</body>, add the runtime script, the container, and the init snippet:
<script src="https://saas.seekdown.ai/js/seekdown-assistant.js"></script>
<div id="seekdown-assistant-root"></div>
<!-- Initialize the assistant with your assistantId and accessToken -->
<script>
document.addEventListener('DOMContentLoaded', function () {
if (window.skdwn?.startAssistant) {
let seekdownAssistantOptions = {
assistantId: 'your-assistant-id',
accessToken: 'your-api-key-or-identity-access-token',
};
skdwn.startAssistant(seekdownAssistantOptions);
} else {
console.error('skdwn.startAssistant is not available.');
}
});
</script>
- Save and open the storefront to confirm the assistant loads.
Before You Start
- Add both your
.myshopify.comdomain and any custom domain to allowed origins. - Have the access token ready if the security mode is API.
Troubleshooting
- If the widget is missing, check the script URL and that both domains are in allowed origins.